Re: Options for select from function returning record?

Поиск
Список
Период
Сортировка
От Stephan Szabo
Тема Re: Options for select from function returning record?
Дата
Msg-id 20030611092407.L93562-100000@megazone23.bigpanda.com
обсуждение исходный текст
Ответ на Re: Options for select from function returning record?  (Rory Campbell-Lange <rory@campbell-lange.net>)
Список pgsql-general
On Wed, 11 Jun 2003, Rory Campbell-Lange wrote:

> On 11/06/03, Stephan Szabo (sszabo@megazone23.bigpanda.com) wrote:
> >
> > On Wed, 11 Jun 2003, Rory Campbell-Lange wrote:
> >
> > > Also is it possible to ever truncate this sort of select as
> ...
> > > ommitting the "AS"?
> >
> > Not for a function returning records currently.  If the type is known and
> > constant, you can instead make a composite type with CREATE TYPE AS and
> > have the function return those rather than record.
>
> I thought that making a type makes the query simpler (for the client
> application). The example below uses the %rowtype row variable type (and
> works!). Is this a recommended approach?

Right now, I'd suggest it for any case where the result definition would
be known at function creation time rather than only at call time (for
example, this wouldn't make sense for dblink).


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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: [HACKERS] SAP and MySQL ... [and Benchmark]
Следующее
От: Stephan Szabo
Дата:
Сообщение: Re: Return Record with CASE problem