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 <mmonc...@gmail.com> > On Mon, Nov 8, 2010 at 3:02 PM, Dmitriy Igrishin <dmit...@gmail.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.