Re: Support for %TYPE in CREATE FUNCTION

Ian Lance Taylor <ian@airs.com>

From: Ian Lance Taylor <ian@airs.com>
To: Jan Wieck <JanWieck@Yahoo.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>, Bruce Momjian <pgman@candle.pha.pa.us>, pgsql-hackers@postgresql.org
Date: 2001-05-30T19:22:30Z
Lists: pgsql-hackers
Jan Wieck <JanWieck@Yahoo.com> writes:

>     What most of those if favor for doing it right now want is an
>     easy  Oracle->PostgreSQL  one-time  porting path. Reasonable,
>     but solveable with some external preprocessor/script too.

Can you explain how an external preprocessor/script addresses the
issue of %TYPE in a function definition?  Presumably the preprocessor
has to translate %TYPE into some definite type when it creates the
function.  But how can a preprocessor address the issue of what to do
when the table definition changes?  There still has to be an entry in
pg_proc for the procedure.  What happens to that entry when the table
changes?

You seem to be saying that %TYPE can be implemented via some other
mechanism.  That is fine with me, but how would that other mechanism
work?  Why it would not raise the exact same set of issues?

Ian