timespan and cast - Mailing list pgsql-sql

From wr@tribe.ping.de
Subject timespan and cast
Date
Msg-id 19980513215809.39025@tribe.ping.de
Whole thread Raw
List 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 by date:

Previous
From: "Victor M. Mondragon A."
Date:
Subject: TPC C & D Benchmarks
Next
From: davez@debitnet.com
Date:
Subject: Perl and SQL