Re: nested hstore patch

Поиск
Список
Период
Сортировка
От Pavel Stehule
Тема Re: nested hstore patch
Дата
Msg-id CAFj8pRBtVugAn4DyOmWuqMZASz=1a=Ro1O4DEYgRX_7o5aRSZQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: nested hstore patch  (Hannu Krosing <hannu@2ndQuadrant.com>)
Ответы Re: nested hstore patch
Список pgsql-hackers
Hello


2013/12/23 Hannu Krosing <hannu@2ndquadrant.com>
On 12/23/2013 12:28 PM, Robert Haas wrote:
> On Fri, Dec 20, 2013 at 6:16 PM, David E. Wheeler <david@justatheory.com> wrote:
>> * New operators:
>>   + `hstore -> int`:     Get string value at array index (starting at 0)
>>   + `hstore ^> text`:    Get numeric value for key
>>   + `hstore ^> int`:     Get numeric value at array index
>>   + `hstore ?> text`:    Get boolean value for key
>>   + `hstore ?> int`:     Get boolean value at array index
>>   + `hstore #> text[]`:  Get string value for key path
>>   + `hstore #^> text[]`: Get numeric value for key path
>>   + `hstore #?> text[]`: Get boolean value for key path
>>   + `hstore %> text`:    Get hstore value for key
>>   + `hstore %> int`:     Get hstore value at array index
>>   + `hstore #%> text[]`: Get hstore value for key path
>>   + `hstore ? int`:      Does hstore contain array index
>>   + `hstore #? text[]`:  Does hstore contain key path
>>   + `hstore - int`:      Delete index from left operand
>>   + `hstore #- text[]`:  Delete key path from left operand
> Although in some ways there's a certain elegance to this, it also
> sorta looks like punctuation soup.  I can't help wondering whether
> we'd be better off sticking to function names.
>
Has anybody looked into how hard it would be to add "method" notation
to postgreSQL, so that instead of calling

getString(hstorevalue, n)

we could use

hstorevalue.getString(n)

yes, I played with it some years ago. I ended early, there was a problem with parser - when I tried append a new rule. And because there was not simple solution, I didn't continue.

But it can be nice feature - minimally for plpgsql coders.

Regards

Pavel
 

--
Hannu Krosing
PostgreSQL Consultant
Performance, Scalability and High Availability
2ndQuadrant Nordic OÜ



--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: [COMMITTERS] pgsql: Upgrade to Autoconf 2.69
Следующее
От: Robert Haas
Дата:
Сообщение: Re: INSERT...ON DUPLICATE KEY LOCK FOR UPDATE