From: | Andrew Dunstan <andrew(at)dunslane(dot)net> |
---|---|
To: | Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, Jim Nasby <Jim(dot)Nasby(at)bluetreble(dot)com> |
Cc: | PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: proposal: row_to_array function |
Date: | 2015-01-16 21:35:45 |
Message-ID: | 54B98431.7000806@dunslane.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 01/16/2015 12:22 PM, Pavel Stehule wrote:
>
>
> There two possible transformations:
>
> row_to_array --> [[key1, value1],[key2, value2], ...]
> row_to_row_array --> [(key1, value1), (key2, value2), ... ]
>
>
> If we're going to go that route, I think it makes more sense to
> create an actual key/value type (ie:
> http://pgxn.org/dist/pair/doc/pair.html) and return an array of that.
>
>
> ok
>
> <http://BlueTreble.com>
>
I think we'd possibly be better off with simply returning a flat array,
[key1, value1, ...]
Thats's what the hstore(text[]) and json_object(text[]) functions
accept, along with the 2D variant, if we want a precedent.
cheers
andrew
From | Date | Subject | |
---|---|---|---|
Next Message | Robert Haas | 2015-01-16 22:10:14 | Re: parallel mode and parallel contexts |
Previous Message | Jim Nasby | 2015-01-16 19:33:53 | Re: proposal: lock_time for pg_stat_database |