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

From Tom Lane
Subject Re: Support for %TYPE in CREATE FUNCTION
Date
Msg-id 24809.991243516@sss.pgh.pa.us
Whole thread Raw
In response to Re: Support for %TYPE in CREATE FUNCTION  (Ian Lance Taylor <ian@airs.com>)
Responses Re: Support for %TYPE in CREATE FUNCTION  (Jan Wieck <JanWieck@Yahoo.com>)
List pgsql-hackers
Ian Lance Taylor <ian@airs.com> writes:
> I have a meta-point: the choices to be made here are not all that
> interesting.  They do have to be defined.  But almost any definition
> is OK.

Well, that implicit assumption is exactly the one I was questioning;
*is* it OK not to be very concerned about what the behavior is?  ISTM
that how the system handles these cases will constrain the use of the
%TYPE feature into certain pathways.  The limitations arising from your
original patch presumably don't matter for your intended use, but they
may nonetheless be surprising for people who try to use it differently.
(We've seen cases before where someone does a quick-and-dirty feature
addition that fails to act as other people expect it to.)

I wanted to see a clear understanding of what the corner-case behavior
is, and a consensus that that behavior is acceptable all 'round.  If
the quick-and-dirty route will be satisfactory over the long run, fine;
but I don't much want to install a new feature that is immediately going
to draw bug reports/upgrade requests/whatever you want to call 'em.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: Support for %TYPE in CREATE FUNCTION
Next
From: "Roberto Abalde"
Date:
Subject: Cache for query plans