Received: from lilly.ping.de (qmailr@lilly.ping.de [195.37.120.2]) by hub.org (8.8.8/8.7.5) with SMTP id SAA04004 for ; Wed, 13 May 1998 18:54:37 -0400 (EDT) From: wr@tribe.ping.de Received: (qmail 6415 invoked by uid 10); 13 May 1998 22:54:36 -0000 Received: from tribe.ping.de by lilly.ping.de with UUCP (rmail-0.1-fdc); 13 May 1998 22:54:36 -0000 Received: (qmail 25960 invoked from network); 13 May 1998 21:00:24 -0000 Received: from unknown (HELO quod.ping.de) (192.168.20.50) by 192.168.20.40 with SMTP; 13 May 1998 21:00:24 -0000 Received: (from werner@localhost) by quod.ping.de (8.8.6/8.7.3) id VAA03752; Wed, 13 May 1998 21:58:09 +0200 Message-ID: <19980513215809.39025@tribe.ping.de> Date: Wed, 13 May 1998 21:58:09 +0200 To: pgsql-sql@postgreSQL.org Subject: timespan and cast Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.88 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