Re: Record type in sql

From: KÖPFERL Robert <robert(dot)koepferl(at)sonorys(dot)at>
To: "'Din Adrian'" <adrian(dot)din(at)easynet(dot)ro>, pgsql-sql(at)postgresql(dot)org
Subject: Re: Record type in sql
Date: 2005-01-17 12:48:49
Message-ID: ED4E30DD9C43D5118DFB00508BBBA76EB1655D@neptun.sonorys.at
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Yo can do s.t. similar, if the order in which you select the columns
corresponds to the order your type is defined.
So you'd gonna use: select intcol, textcol from table;

> -----Original Message-----
> From: Din Adrian [mailto:adrian(dot)din(at)easynet(dot)ro]
> Sent: Montag, 17. Jänner 2005 13:31
> To: pgsql-sql(at)postgresql(dot)org
> Subject: [SQL] Record type in sql
>
>
> Hello,
> I have a little problem
> I want to declare a type record for later use like that
>
> create type record_structure1 as (id int2, nume text);
> that is ok!
>
> next in a function I want to use something like that:
>
> select * from table as record_structure1 ?
> instead of writing
> select * from table as t1(id int2, nume text);
> is this possible?
>
> Thank You,
> Adrian Din
>
> --
> Using Opera's revolutionary e-mail client: http://www.opera.com/m2/
>
> ---------------------------(end of
> broadcast)---------------------------
> TIP 9: the planner will ignore your desire to choose an index
> scan if your
> joining column's datatypes do not match
>

Browse pgsql-sql by date

  From Date Subject
Next Message KÖPFERL Robert 2005-01-17 15:25:59 Inserting or Deleting conditionally
Previous Message Din Adrian 2005-01-17 12:31:26 Record type in sql