On Sunday, I downloaded the newest snapshot of pg_dump, with Tom's fixes
applied (it no longer dumps core when dumping indexes). However, pg_dump
is incorrectly dumping argument lists for trigger procedures:

test=# drop trigger mytrigger on mytable;
DROP
test=# create trigger mytrigger
before insert on mytable
for each row execute procedure autoinc ('myfield', 'myseq');
CREATE

[postgres@ferrari /tmp]$ pg_dump test
...
CREATE TRIGGER "mytrigger" BEFORE INSERT ON "mytable" FOR EACH ROW
EXECUTE PROCEDURE autoinc ('myfield', 'myfieldmyseq');
...

Note the second parameter to autoinc() -- it should be 'myseq', not
'myfieldmyseq'. I suspect someone isn't doing a resetPQExpBuffer()
somewhere. Can anyone confirm this?

Mike Mascari




Mon, 17 Jan 2000 19:17:05 -0500
Mike Mascari <mascarm@mascari.com>
Is pg_dump still broken?
Mike Mascari <mascarm@mascari.com> writes:
> Note the second parameter to autoinc() -- it should be 'myseq', not
> 'myfieldmyseq'. I suspect someone isn't doing a resetPQExpBuffer()
> somewhere. Can anyone confirm this?

Yup, you're right.  I note the procedure name isn't getting quoted,
either.  Fix committed.

			regards, tom lane

Tue, 18 Jan 2000 02:31:26 -0500
Tom Lane <tgl@sss.pgh.pa.us>
Re: [HACKERS] Is pg_dump still broken? 