Re: plpgsql - DECLARE - cannot to use %TYPE or %ROWTYPE for composite types

Поиск
Список
Период
Сортировка
От Jim Nasby
Тема Re: plpgsql - DECLARE - cannot to use %TYPE or %ROWTYPE for composite types
Дата
Msg-id 56D776F6.2080304@BlueTreble.com
обсуждение исходный текст
Ответ на Re: plpgsql - DECLARE - cannot to use %TYPE or %ROWTYPE for composite types  (Pavel Stehule <pavel.stehule@gmail.com>)
Ответы Re: plpgsql - DECLARE - cannot to use %TYPE or %ROWTYPE for composite types  (Pavel Stehule <pavel.stehule@gmail.com>)
Список pgsql-hackers
On 3/2/16 3:52 PM, Pavel Stehule wrote:
>     Right, and it's arguably dubious that that doesn't already work.
>     Unfortunately, these % things are just random plpgsql parser hacks, not
>     real types.  Maybe this should be done in the main PostgreSQL parser
>     with parameter hooks, if we wanted this feature to be available outside
>     plpgsql as well.
>
>
> I am not fan to propagate this feature outside PLpgSQL - it is possible
> new dependency between database object, and the cost is higher than
> benefits.

I fail to see how it'd be a dependency. I'd expect it to look up the 
type when you run the command, just like plpgsql does. I think it'd be 
useful to have.

That said, I think that should be a completely separate patch and 
discussion. Lets at least get it into plpgsql first.

As for the array of element/element of array feature; I agree it would 
be nice, but we're pretty late in the game for that, and I don't see why 
that couldn't be added later.
-- 
Jim Nasby, Data Architect, Blue Treble Consulting, Austin TX
Experts in Analytics, Data Architecture and PostgreSQL
Data in Trouble? Get it in Treble! http://BlueTreble.com



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: WIP: Upper planner pathification
Следующее
От: "David G. Johnston"
Дата:
Сообщение: WHERE clause not used when index is used (9.5)