> Peter Eisentraut <[email protected]> wrote:
> > If you want a "pretty" option on pg_get_triggerdef(), you could nowadays
> > also implement that via a parameter default value instead of a second
> > function.
>
> OK, I'll rewrite it to use default parameter.
I tried to remove pg_get_triggerdef_ext() and add a second argument
with default value to pg_get_triggerdef(), but there is a problem.
The definition of pg_get_triggerdef will be the following:
DATA(insert OID = 1662 (
pg_get_triggerdef PGNSP PGUID 12 1 0 0 f f f t f s 2 1 25 "26 16"
_null_ _null_ _null_
"({CONST :consttype 16 :consttypmod -1 :constlen 1 :constbyval true
:constisnull false :location 41 :constvalue 1 [ 0 0 0 0 0 0 0 0 ]})"
pg_get_triggerdef _null_ _null_ _null_ ));
The problem is in :constvalue part; It will be
":constvalue 1 [ 0 0 0 0 0 0 0 0 ]" on 64bit platform, but
":constvalue 1 [ 0 0 0 0 ]" on 32bit platform.
I think we should not use default values in functions listed on pg_proc.h,
so the previous patch is better than default value version.
Regards,
---
ITAGAKI Takahiro
NTT Open Source Software Center
--
Sent via pgsql-hackers mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers