Re: hstores in pl/python

From: Dmitriy Igrishin <dmitigr(at)gmail(dot)com>
To: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
Cc: Andres Freund <andres(at)anarazel(dot)de>, pgsql-hackers(at)postgresql(dot)org, Jan Urbański <wulczer(at)wulczer(dot)org>
Subject: Re: hstores in pl/python
Date: 2010-12-13 16:07:31
Message-ID: AANLkTintG2fa7WC44grBGJAW7oOuy7xPvaa-758tfUaK@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

There are a lot of operators and functions to work with hstore.
Does it worth it to implement similar things only to make it
possible using operator [] ?

2010/12/13 Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>

> >>
> >> name and interface - hstore is designed as external module - a
> >> internal class can be designed different.
> > Could you actually name such a difference rather than pointing to some
> airily
> > hint of one? That would make it way much easier to see where you want to
> go.
>
> My idea is:
>
> somevar['key'] = value
> value = somevar['key'];
>
What type of <value> is? Can it be assoc. array ?
Is it possible to indexing assoc. array by position ?
Any many many other questions can be there. So,
I don't think that assoc. arrays has common interface.
Its still specialized type.
But, Pavel, I feel you idea. You want to make the syntax
clear in particular...

>
> or with constructor
>
> somevar = ARRAY[key1 => value1, key2 => value2, .. ]
>
> or some similar.
>
> Regards
>
> Pavel Stehule
>

--
// Dmitriy.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2010-12-13 16:08:42 Re: ALTER TABLE ... ADD FOREIGN KEY ... NOT ENFORCED
Previous Message Alvaro Herrera 2010-12-13 16:06:32 Re: ALTER EXTENSION ... UPGRADE;