timespan and cast

From: wr(at)tribe(dot)ping(dot)de
To: pgsql-sql(at)postgreSQL(dot)org
Subject: timespan and cast
Date: 1998-05-13 19:58:09
Message-ID: 19980513215809.39025@tribe.ping.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)keys(dot)pgp(dot)net Fax: +49 234 540239
D-44807 Bochum with "get 0xED527449" in the subject

Browse pgsql-sql by date

  From Date Subject
Next Message Mike Lemler 1998-05-13 20:28:42 Referential Integrity
Previous Message Mario Filipe 1998-05-13 18:39:08 importing data from other DB's and from other servers