Table with differerent Data Types

From: xaviergxf <xaviergxf(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Table with differerent Data Types
Date: 2008-04-23 19:40:15
Message-ID: 6e02b881-50b2-4a1a-a500-5a9bb1f85200@m44g2000hsc.googlegroups.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,

I´m trying to do the follow: create a table like:
create table t(
cod serial,
data_type char(10),
value ???
);

I would like to do the follow the table would tell me what data type
its the value. For instance:

insert into t values(1, 'Integer', 12);
insert into t values(2, 'String', 'test');
insert into t values(3, 'Float', 1.23);

How can i do that? Its that possible? How Can i solve this problem?

Thanks a lot

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Raymond O'Donnell 2008-04-23 19:46:36 Re: query question really cant give a summary here so read the body ;-)
Previous Message Brian Cox 2008-04-23 19:37:35 query performance