Re: Review: [PL/pgSQL] %TYPE and array declaration - second patch

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: Pavel Stehule <pavel.stehule@gmail.com>
Cc: PostgreSQL Hackers <pgsql-hackers@postgresql.org>, Wojciech Muła <wojciech_mula@poczta.onet.pl>
Date: 2011-10-28T17:06:15Z
Lists: pgsql-hackers
Pavel Stehule <pavel.stehule@gmail.com> writes:
> this is just small note about length of this patch. This patch was
> significantly smaller then he solved problem with derivate types for
> compound types - it should to solve problem described in this thread

> http://stackoverflow.com/questions/7634704/declare-variable-of-composite-type-in-postgresql-using-type

Well, I think what that example shows is that there's a good reason for
plpgsql_parse_wordtype and plpgsql_parse_cwordtype to handle the
PLPGSQL_NSTYPE_ROW case, which they could do based on the tdtypeid from
the row's tupdesc.  Still isn't going to run to anything like 500 lines
of new code, nor justify a grammar rewrite that risks introducing new
bugs.  The existing code doesn't need to special-case type names that
are also plpgsql keywords, and I'd just as soon not introduce an
assumption that there's no overlap there.

			regards, tom lane