Skip site navigation (1) Skip section navigation (2)

Re: Composite Types and Function Parameters

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: Merlin Moncure <mmoncure(at)gmail(dot)com>, Greg <grigorey(at)yahoo(dot)co(dot)uk>, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Composite Types and Function Parameters
Date: 2010-10-28 03:38:23
Message-ID: 4056.1288237103@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-hackers
Andrew Dunstan <andrew(at)dunslane(dot)net> writes:
> But I think we can do better than this. We should really pass an hashref 
> with the record's column names as keys rather than just calling 
> record_out. I'll work on that.

Definitely.  If you aren't providing that info then it's hard to write
a generic function, which is more or less the whole point here.  I'd
even argue that it'd be nice if the function could find out the data
types of the record's columns; though I have no idea what a reasonable
API for that would be in Perl.

			regards, tom lane

In response to

Responses

pgsql-hackers by date

Next:From: Andrew DunstanDate: 2010-10-28 04:08:39
Subject: Re: Composite Types and Function Parameters
Previous:From: Tom LaneDate: 2010-10-28 03:32:25
Subject: Re: Re: Postgres insert performance and storage requirement compared to Oracle

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group