pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: wr@tribe.ping.de
To: pgsql-sql@postgreSQL.org
Subject: timespan and cast
Date: Wed, 13 May 1998 21:58:09 +0200
Message-ID: <19980513215809.39025@tribe.ping.de> (raw)

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    



Message-ID: <19980513215809.39025@tribe.ping.de>
Permalink:  ../19980513215809.39025@tribe.ping.de/
Also on:    postgresql.org/message-id/19980513215809.39025@tribe.ping.de

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-sql@postgresql.org
  Cc: wr@tribe.ping.de
  Subject: Re: timespan and cast
  In-Reply-To: <19980513215809.39025@tribe.ping.de>
  References: <19980513215809.39025@tribe.ping.de>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox