timespan and cast

Поиск
Список
Период
Сортировка
От wr@tribe.ping.de
Тема timespan and cast
Дата
Msg-id 19980513215809.39025@tribe.ping.de
обсуждение исходный текст
Список pgsql-sql
I would like to know how to implement a field of type timespan where time
ranges could be specified like from year-year. E .g if there is a field
value like 1998-2005 there should be a match with a

  select timerange from table where timerange=2000;

I would appreciate any examples.

My second problem is the cast operator. I wasn't able to set an attribute
of type oid with a value from an attribute of type int4. In the sql manpage
"CAST 'string' as new_type" is mentioned but not how to apply this within an
sql command like update.

TIA, Werner
--
Werner Reisberger         public-key available:          voice: +49 234 540294
Schoellmannstr. 20    pgp-public-keys@keys.pgp.net         Fax: +49 234 540239
D-44807 Bochum      with "get 0xED527449" in the subject

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

Предыдущее
От: "Victor M. Mondragon A."
Дата:
Сообщение: TPC C & D Benchmarks
Следующее
От: davez@debitnet.com
Дата:
Сообщение: Perl and SQL