Get a time from a char column

From: Blaise Carrupt <bc(at)mjtsa(dot)com>
To: pgsql-sql(at)postgresql(dot)org
Subject: Get a time from a char column
Date: 2000-10-25 10:48:38
Message-ID: 200010251048.LAA22831@mjtsa.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

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 ?

Browse pgsql-sql by date

  From Date Subject
Next Message Shane McEneaney 2000-10-25 16:03:50 How to Return number of rows updated in stored procedure
Previous Message Tomas Berndtsson 2000-10-25 07:21:52 Re: knowing which columns have beend UPDATEd inside a TRIGGER?