Re: join between a table and function.

Поиск
Список
Период
Сортировка
От Harald Fuchs
Тема Re: join between a table and function.
Дата
Msg-id 861uwliiqj.fsf@mgm.protecting.net
обсуждение исходный текст
Ответ на join between a table and function.  (Lauri Kajan <lauri.kajan@gmail.com>)
Ответы Re: join between a table and function.
Список pgsql-general
In article <CAKWoFMJWZ3znXCj9rADn4ov+krsa-133968YvAg3L8M3W3zyQQ@mail.gmail.com>,
Lauri Kajan <lauri.kajan@gmail.com> writes:

> I have also tried:
> select
> *, getAttributes(a.id)
> from
>   myTable a

> That works almost. I'll get all the fields from myTable, but only a
> one field from my function type of attributes.
> myTable.id | myTable.name | getAttributes
> integer      | character        | attributes
> 123           | "record name" | (10,20)

> What is the right way of doing this?

If you want the attributes parts in extra columns, use

SELECT *, (getAttributes(a.id)).* FROM myTable a

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

Предыдущее
От: John DeSoi
Дата:
Сообщение: Re: [ADMIN] Using Postgresql as application server
Следующее
От: "David Johnston"
Дата:
Сообщение: Re: join between a table and function.