Re: each (hstore)
| От | hubert depesz lubaczewski |
|---|---|
| Тема | Re: each (hstore) |
| Дата | |
| Msg-id | 20110517114149.GB549@depesz.com обсуждение исходный текст |
| Ответ на | each (hstore) (Tarlika Elisabeth Schmitz <postgresql3@numerixtechnology.de>) |
| Список | pgsql-general |
On Tue, May 17, 2011 at 12:27:08PM +0100, Tarlika Elisabeth Schmitz wrote:
> On Pavel's blog, I found this statement, which does just what I need:
>
> select (each(hstore(foo))).* from foo;
>
>
> Excuse the daft question, but could, please, you explain what ".*" does?
each(hstore) is a function that returns set of records. each record can
have many fields.
when you have value which is record, you can add .* to get all columns
from it, separately. since each(hstore) is expression, and not column
name/alias - you need to wrap is in () before adding .*
Best regards,
depesz
--
The best thing about modern society is how easy it is to avoid contact with it.
http://depesz.com/
В списке pgsql-general по дате отправления: