Get a time from a char column - Mailing list pgsql-sql

From Blaise Carrupt
Subject Get a time from a char column
Date
Msg-id 200010251048.LAA22831@mjtsa.com
Whole thread Raw
List 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 ?


pgsql-sql by date:

Previous
From: "Sivagami ."
Date:
Subject: Add Constraint
Next
From: "Shane McEneaney"
Date:
Subject: How to Return number of rows updated in stored procedure