Re: need of anonymous record

From: David G Johnston <david(dot)g(dot)johnston(at)gmail(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: need of anonymous record
Date: 2014-05-03 14:23:20
Message-ID: 1399127000748-5802303.post@n5.nabble.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Peter Padua Krauss wrote
> The first question is about performance: "*returns table*" have the same
> performance than "*returns record*"??
> If "yes", the *record* datatype is somewhat outdated?

Table defines the possibility to return a set while record can only ever
return a single value; so likely the set version is less performant but
regardless they have different semantics.

> I am new here, I do not know how, but I'm available to help... Can a
> future
> version of PostgreSQL implement some solution?

Craig's reply in the array post explained the reality quite well. SQL is
strongly typed so while some improvement on the use of anonymous record
types is possible the SQL way of doing things would be to CREATE TYPE.
Hstore and JSON provides an alternative means to define a column in a
dynamic way.

It is unlikely that records types would ever be altered for dynamic member
access given that these types exist. But it is not impossible given a good
implementation. The one benefit is that current attempts give errors so
making it work only has to avoid performance regressions and not screw up
the parser.

As Craig said: how much does this bother you? If you cannot code C yourself
are you willing to pay someone to implement this feature? The cost-benefit
analysis suggests this particular need is a poor area to invest resources
in.

David J.

--
View this message in context: http://postgresql.1045698.n5.nabble.com/need-of-anonymous-record-tp5802301p5802303.html
Sent from the PostgreSQL - hackers mailing list archive at Nabble.com.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew Dunstan 2014-05-03 14:36:35 Re: need of anonymous record
Previous Message Bernd Helmle 2014-05-03 13:56:43 Re: Sending out a request for more buildfarm animals?