pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Blaise Carrupt <bc@mjtsa.com>
To: pgsql-sql@postgresql.org
Subject: Get a time from a char column
Date: Wed, 25 Oct 2000 11:48:38 +0100 (WETDST)
Message-ID: <200010251048.LAA22831@mjtsa.com> (raw)

Hi !

What I would like is this :

insert into tt1
(select a from tt2)

where tt1.x field is a time, and tt2.a field is a char containing '10:00'.

Doing that, Postgres tells me something like 'x is of type time and a of type 
bpchar'. That's true, but I can't find the way to cast my char field in a time.

And in the other hand, this works : insert into tt1 values('10:00')
what seems to be the same...

Does someone have an idea ?



Message-ID: <200010251048.LAA22831@mjtsa.com>
Permalink:  ../200010251048.LAA22831@mjtsa.com/
Also on:    postgresql.org/message-id/200010251048.LAA22831@mjtsa.com

 · 

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: bc@mjtsa.com
  Subject: Re: Get a time from a char column
  In-Reply-To: <200010251048.LAA22831@mjtsa.com>
  References: <200010251048.LAA22831@mjtsa.com>

* 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