From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | andrew <andrew(dot)ylzhou(at)gmail(dot)com> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: user defined function |
Date: | 2006-01-25 21:28:46 |
Message-ID: | 13139.1138224526@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
andrew <andrew(dot)ylzhou(at)gmail(dot)com> writes:
> Sorry, I modified the parser code and forgot abt it. Now there is no
> problem in creating the function. But there is another problem. I
> create a function to accept record type parameter. But when I call it
> on a specific composite type, error is reported. The followings are
> what I have done:
> backend> create function complete(record) returns int4 as
> '$libdir/qualityudf' language C
> QUERY: create function complete(record) returns int4 as
> '$libdir/qualityudf' language C
> backend> select *, complete(Person) from Person
> QUERY: select *, complete(Person) from Person
> ERROR: Function complete(person) does not exist
Hmm. Looking at parse_coerce.c, 8.1 is the first release that thinks
named composite types can be coerced to RECORD. I think you may be
forced to upgrade if you want this to work. Changing 7.3's coerce_type()
to allow this case would be simple enough, but I think you are still
going to be minus a lot of infrastructure that's required to make it
actually do anything useful :-(
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Aly Dharshi | 2006-01-25 21:31:55 | Re: Postgresql Segfault in 8.1 |
Previous Message | Benjamin Smith | 2006-01-25 21:17:43 | Re: Postgresql Segfault in 8.1 |