Optionally use history table oid in trigger definition#35
Conversation
Also stringToQualifiedNameList was moved to utils/regproc.h in PG 10 This closes arkhipov#34
4b6e2a6 to
212be1e
Compare
|
Wow! You have done a lot since the last time we discussed this issue. I was a bit busy at the time, but I will review the PR this weekend. I was not sure if I could implement the trigger such that it would work properly with backup/restore since OIDs are not persistent over backups, so I put it off. Does your version work properly when restored from a backup? |
|
Hey! Good to hear back! Nope, indeed it doesn't backup/restore table OIDs thus making versioning broken upon restore. select tgrelid::regclass, tgname, proname,
(regexp_split_to_array(tgargs::text, '\\000'))[:tgnargs] args,
rels, _oids
from pg_trigger t
join pg_proc p on t.tgfoid=p.oid
join lateral (
select array_agg(relname) rels, array_agg(oid) _oids
from pg_class c
where position(tgrelid::regclass::text in relname)=1
and c.oid!=tgrelid
) candidates on true"versioning";"versioning_trigger";"versioning2";"{sys_period,270603,false}";"{versioning_history}";"{16468}" P.S. I wonder where they (PG) define _CRT_SECURE_NO_WARNINGS for visual studio to be able to use strncpy. |
75fe800 to
0240304
Compare
DO NOT MERGE THIS!