From: | Dmitriy Igrishin <dmitigr(at)gmail(dot)com> |
---|---|
To: | Merlin Moncure <mmoncure(at)gmail(dot)com> |
Cc: | Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: proposal: plpgsql - iteration over fields of rec or row variable |
Date: | 2010-11-08 20:17:09 |
Message-ID: | AANLkTin5D71H_n1setvOrQ+1RuA-WRZa0gUWiVZjOvDA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Merlin,
Sorry, I don't clearly understand what the problem here, but I just want to
avoid
conversion from record to hstore with suggested API. I am currently happy
with
hstore API to work with record. From the user's point of view :-).
2010/11/8 Merlin Moncure <mmoncure(at)gmail(dot)com>
> On Mon, Nov 8, 2010 at 3:02 PM, Dmitriy Igrishin <dmitigr(at)gmail(dot)com>
> wrote:
> > Hey Pavel, Tom, Merlin,
> >
> > As a user, I would like to work with records by using simple API:
> >
> > -- Returns a number of key/values pairs of record.
> > nKeys_ integer := nRecordKeys(NEW);
> >
> > -- Returns an i-th key.
> > key_i text := recordKey(NEW, i);
> >
> > -- Returns an i-th value.
> > value1_ text := recordValueByIndex(NEW, i);
> >
> > -- Returns an value by named key.
> > value2_ text := recordValueByName(NEW, "id");
> >
> > and so on...
>
> This doesn't really solve the problem -- you need some participation
> from plpgsql because function behavior post-plan time can not be
> ambiguous.
>
> merlin
>
--
// Dmitriy.
From | Date | Subject | |
---|---|---|---|
Next Message | Pavel Stehule | 2010-11-08 20:21:55 | Re: proposal: plpgsql - iteration over fields of rec or row variable |
Previous Message | Pavel Stehule | 2010-11-08 20:15:04 | Re: proposal: plpgsql - iteration over fields of rec or row variable |