Re: Select + Functions + Composite Types: Behavior
| От | Tom Lane |
|---|---|
| Тема | Re: Select + Functions + Composite Types: Behavior |
| Дата | |
| Msg-id | 25245.1297549950@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | Select + Functions + Composite Types: Behavior ("David Johnston" <polobo@yahoo.com>) |
| Ответы |
Re: Select + Functions + Composite Types: Behavior
Re: Select + Functions + Composite Types: Behavior |
| Список | pgsql-general |
"David Johnston" <polobo@yahoo.com> writes:
> If I put a function that returns a composite type into the FROM clause of a
> SELECT query (and it - the function - is the only source for the query) the
> "*" select list expands so that there is a single record for each component
> of the composite type.
> SELECT * FROM compositereturningfunction()
> Yields -> 2 columns (one for id and one for data)
> I've read quite a bit about plpgsql and composite types and do not recall
> anything about this specific default behavior and methods to force
> (workaround) to the other behavior.
It's just like tables. Try
select x from compositereturningfunction() x
regards, tom lane
В списке pgsql-general по дате отправления: