Re: Composite datatypes, dynamic member fields

Поиск
Список
Период
Сортировка
От Ross J. Reedstrom
Тема Re: Composite datatypes, dynamic member fields
Дата
Msg-id 20020513164101.GC9836@rice.edu
обсуждение исходный текст
Ответ на Re: Composite datatypes, dynamic member fields  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-interfaces
On Mon, May 13, 2002 at 10:17:55AM -0400, Tom Lane wrote:
> 
> The computed field doesn't quite have the same status as real fields
> --- notice that * doesn't know about it in the above example --- but
> it's a useful technique anyway.

That particular shortcoming can be overcome by wrapping the computed
fields in a view:

create view tour_lengths AS select *, tours.numdays from tours;

test=# create view tours_plus as  select *, tours.numdays from tours;
CREATE

test=# select * from tours_plus;  depart   |   return   | numdays 
------------+------------+---------2002-01-01 | 2002-01-10 |       92001-12-15 | 2002-01-05 |      21
(2 rows)


Ross


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

Предыдущее
От: "C. Maj"
Дата:
Сообщение: Re: PgAccess directory structure
Следующее
От: "C. Maj"
Дата:
Сообщение: Re: pgaccess - the discussion is over