Thread: BUG #5676: When creating a trigger an dummy argument is inserted.

BUG #5676: When creating a trigger an dummy argument is inserted.

From
"Christopher Hotchkiss"
Date:
The following bug has been logged online:

Bug reference:      5676
Logged by:          Christopher Hotchkiss
Email address:      christopher.a.hotchkiss@jpmchase.com
PostgreSQL version: 9.0.0
Operating system:   Ubuntu 10.04 x64
Description:        When creating a trigger an dummy argument is inserted.
Details:

When creating the following trigger:

CREATE TRIGGER c_aud_trg
  BEFORE INSERT OR UPDATE OR DELETE
  ON ca
  FOR EACH ROW
  EXECUTE PROCEDURE c_aud_trg_trfunc();

It will actually get created as (using pgAdmin 1.12):
CREATE TRIGGER c_aud_trg
  BEFORE INSERT OR UPDATE
  ON ca
  FOR EACH ROW
  EXECUTE PROCEDURE c_aud_trg_func(E'\\x');

If that same trigger is dropped and re-added using what is in the database,
the following shows up:
CREATE TRIGGER c_aud_trg
  BEFORE INSERT OR UPDATE
  ON ca
  FOR EACH ROW
  EXECUTE PROCEDURE c_aud_trg_func(E'\\x5c7800');

The trigger fired normally but what is that junk argument?

Re: BUG #5676: When creating a trigger an dummy argument is inserted.

From
Tom Lane
Date:
"Christopher Hotchkiss" <christopher.a.hotchkiss@jpmchase.com> writes:
> When creating the following trigger:

> CREATE TRIGGER c_aud_trg
>   BEFORE INSERT OR UPDATE OR DELETE
>   ON ca
>   FOR EACH ROW
>   EXECUTE PROCEDURE c_aud_trg_trfunc();

> It will actually get created as (using pgAdmin 1.12):
> CREATE TRIGGER c_aud_trg
>   BEFORE INSERT OR UPDATE
>   ON ca
>   FOR EACH ROW
>   EXECUTE PROCEDURE c_aud_trg_func(E'\\x');

> If that same trigger is dropped and re-added using what is in the database,
> the following shows up:
> CREATE TRIGGER c_aud_trg
>   BEFORE INSERT OR UPDATE
>   ON ca
>   FOR EACH ROW
>   EXECUTE PROCEDURE c_aud_trg_func(E'\\x5c7800');

I think what you've got here is a pgAdmin bug, because I see no such
behavior using psql and pg_dump.  Suggest reporting it on the pgAdmin
mailing lists.

            regards, tom lane

Re: BUG #5676: When creating a trigger an dummy argument is inserted.

From
Christopher A Hotchkiss
Date:
Thanks Tom,=0D
I will report it to them.=0D
=0D
Christopher A Hotchkiss=0D
JPMorgan Chase & Co. - Navy Cash Application Developer=0D
Email christopher.a.hotchkiss@jpmchase.com=0D
=0D
-----Original Message-----=0D
From: Tom Lane [mailto:tgl@sss.pgh.pa.us] =0D
Sent: Friday, September 24, 2010 12:04 PM=0D
To: Christopher A Hotchkiss=0D
Cc: pgsql-bugs@postgresql.org=0D
Subject: Re: [BUGS] BUG #5676: When creating a trigger an dummy argument is=
 inserted. =0D
=0D
"Christopher Hotchkiss" <christopher.a.hotchkiss@jpmchase.com> writes:=0D
> When creating the following trigger:=0D
=0D
> CREATE TRIGGER c_aud_trg=0D
>   BEFORE INSERT OR UPDATE OR DELETE=0D
>   ON ca=0D
>   FOR EACH ROW=0D
>   EXECUTE PROCEDURE c_aud_trg_trfunc();=0D
=0D
> It will actually get created as (using pgAdmin 1.12):=0D
> CREATE TRIGGER c_aud_trg=0D
>   BEFORE INSERT OR UPDATE=0D
>   ON ca=0D
>   FOR EACH ROW=0D
>   EXECUTE PROCEDURE c_aud_trg_func(E'\\x');=0D
=0D
> If that same trigger is dropped and re-added using what is in the databas=
e,=0D
> the following shows up:=0D
> CREATE TRIGGER c_aud_trg=0D
>   BEFORE INSERT OR UPDATE=0D
>   ON ca=0D
>   FOR EACH ROW=0D
>   EXECUTE PROCEDURE c_aud_trg_func(E'\\x5c7800');=0D
=0D
I think what you've got here is a pgAdmin bug, because I see no such=0D
behavior using psql and pg_dump.  Suggest reporting it on the pgAdmin=0D
mailing lists.=0D
=0D
            regards, tom lane=0D
This communication is for informational purposes only. It is not
intended as an offer or solicitation for the purchase or sale of
any financial instrument or as an official confirmation of any
transaction. All market prices, data and other information are not
warranted as to completeness or accuracy and are subject to change
without notice. Any comments or statements made herein do not
necessarily reflect those of JPMorgan Chase & Co., its subsidiaries
and affiliates.=0D
=0D
This transmission may contain information that is privileged,
confidential, legally privileged, and/or exempt from disclosure
under applicable law. If you are not the intended recipient, you
are hereby notified that any disclosure, copying, distribution, or
use of the information contained herein (including any reliance
thereon) is STRICTLY PROHIBITED. Although this transmission and any
attachments are believed to be free of any virus or other defect
that might affect any computer system into which it is received and
opened, it is the responsibility of the recipient to ensure that it
is virus free and no responsibility is accepted by JPMorgan Chase &
Co., its subsidiaries and affiliates, as applicable, for any loss
or damage arising in any way from its use. If you received this
transmission in error, please immediately contact the sender and
destroy the material in its entirety, whether in electronic or hard
copy format. Thank you.=0D
=0D
Please refer to http://www.jpmorgan.com/pages/disclosures for
disclosures relating to European legal entities.