Re: plpgsql - DECLARE - cannot to use %TYPE or %ROWTYPE for composite types - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: plpgsql - DECLARE - cannot to use %TYPE or %ROWTYPE for composite types
Date
Msg-id 20160118205147.GA129226@alvherre.pgsql
Whole thread Raw
In response to Re: plpgsql - DECLARE - cannot to use %TYPE or %ROWTYPE for composite types  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Responses Re: plpgsql - DECLARE - cannot to use %TYPE or %ROWTYPE for composite types  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
FWIW the reason I read through this patch is that I wondered if there
was anything in common with this other patch
https://commitfest.postgresql.org/8/459/ -- and the answer seems to be
"no".  What that patch does is add a new construct TYPE(1+1) 
which in this case returns "int4"; I guess if we wanted to augment that
functionality to cover Pavel's use case we would additionally need ELEMENTTYPE(somearray)
and ARRAYTYPE(some-non-array)
in the core grammar ... sounds like a hard sell.

BTW are we all agreed that enabling foo%ARRAYTYPE
and foo%ELEMENTYPE
in plpgsql's DECLARE section is what we want for this?

-- 
Álvaro Herrera                http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services



pgsql-hackers by date:

Previous
From: Peter Geoghegan
Date:
Subject: Re: Interesting read on SCM upending software and hardware architecture
Next
From: "Igal @ Lucee.org"
Date:
Subject: system mingw not recognized