Re: hstore ==> and deprecate =>

From: Merlin Moncure <mmoncure(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Joseph Adams <joeyadams3(dot)14159(at)gmail(dot)com>, Peter Eisentraut <peter_e(at)gmx(dot)net>, Robert Haas <robertmhaas(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: hstore ==> and deprecate =>
Date: 2010-06-12 01:00:44
Message-ID: AANLkTimYBykhwjYx0ne4wKpGWuqxzxGCPf8NESxGo9HI@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Jun 11, 2010 at 5:23 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Joseph Adams <joeyadams3(dot)14159(at)gmail(dot)com> writes:
>> To repeat an earlier question (which was in turn repeating an earlier
>> question), would it be possible to do one of these, yielding '
>> "key"=>"this", "key2"=>"that" '::hstore  :
>
>> hstore(key := 'this', key2 := 'that')
>> hstore(key => 'this', key2 => 'that')
>> hstore(row('this' AS key, 'that' AS key2))
>
> The last of those is probably the easiest to get to.  We already have
> hstore_from_record:
>
> contrib_regression=# select hstore(row('this', 'that'));
>           hstore
> ----------------------------
>  "f1"=>"this", "f2"=>"that"
> (1 row)
>
> and the only thing lacking is an easy way to specify the column names
> associated with the anonymous record type.  Extending the ROW()
> construct with AS labels as suggested above might be a reasonable way.

+1

A couple of people were just requesting that very thing (ROW/AS) on
the IRC channel today. row() is a pretty useful mechanism and it
would be nice to have it more defensible vs. table changes.

merlin

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Josh Berkus 2010-06-12 01:10:18 Re: Proposal for 9.1: WAL streaming from WAL buffers
Previous Message Florian Pflug 2010-06-12 00:34:57 Re: Proposal for 9.1: WAL streaming from WAL buffers