Re: Support for %TYPE in CREATE FUNCTION - Mailing list pgsql-hackers

From Pascal Scheffers
Subject Re: Support for %TYPE in CREATE FUNCTION
Date
Msg-id Pine.LNX.4.32L2.0106010800530.21797-100000@io
Whole thread Raw
In response to Re: Support for %TYPE in CREATE FUNCTION  (Jan Wieck <JanWieck@Yahoo.com>)
Responses Re: Re: Support for %TYPE in CREATE FUNCTION  (Michael Samuel <michael@miknet.net>)
List pgsql-hackers
Hi,

I've been following this discussion with interest. As a member of the
OpenACS community I'd like to see the %TYPE feature in PG ASAP. I also
understand the reluctance of some of the PG team members in implementing
something that is not anywhere near 'perfect'.

I like Jans' (and Ian?) suggestion of ONLY doing resolution at create
time, as a full 'tracking-the-current-definition' seems to too tough for
now. I think it will be very acceptable to a lot of us out there to have
to drop and re-create our own dependancies. A lot of times, the changes
may not require recoding of the function (except for languages like C).
For OpenACS, schema changes on production machines will mostly be managed
by upgrade sql scripts. Although not 'perfect', having to drop and
recreate functions during upgrade are only minor problems.

>     AND  expect  it  to  do  more  than that.  So a NOTICE at the
>     actual usage, telling that  x%TYPE  for  y  got  resolved  to
>     basetype  z  and will currently NOT follow later changes to x
>     should do it.

So if you could implement it like that, we will be VERY happy.

Regards,
Pascal Scheffers




pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: Imperfect solutions
Next
From: Hannu Krosing
Date:
Subject: Re: Imperfect solutions