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

From Pavel Stehule
Subject Re: plpgsql - DECLARE - cannot to use %TYPE or %ROWTYPE for composite types
Date
Msg-id CAFj8pRDvGyU-E1n7Nkbe0aewCjaZpcYqpQGjQtJEv3kX8Bw7hg@mail.gmail.com
Whole thread Raw
In response to Re: plpgsql - DECLARE - cannot to use %TYPE or %ROWTYPE for composite types  (Jim Nasby <Jim.Nasby@BlueTreble.com>)
List pgsql-hackers


2015-12-21 1:06 GMT+01:00 Jim Nasby <Jim.Nasby@bluetreble.com>:
On 10/30/15 6:01 AM, Pavel Stehule wrote:
I am sending patch that enables to use references to polymorphic
parameters of row types. Another functionality is possibility to get
array or element type of referenced variable. It removes some gaps when
polymorphic parameters are used.

Did this make it into a commitfest?

yes, it is relative trivial small patch without any side effects or possible performance issues.

The important (and possible disputable) part of this patch is new syntax

DECLARE
  var othervar%arraytype,
  var othervar%elementtype;

It is consistent with current state, and doesn't increase a complexity of DECLARE part in plpgsql parser - what was reason for reject this idea 5 years ago (no necessary reserved keywords, ...) .

Regards

Pavel

 
--
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 by date:

Previous
From: Kyotaro HORIGUCHI
Date:
Subject: Re: A typo in syncrep.c
Next
From: sri harsha
Date:
Subject: Threads in PostgreSQL