pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: KÖPFERL Robert <robert.koepferl@sonorys.at>
To: 'Din Adrian' <adrian.din@easynet.ro>
To: pgsql-sql@postgresql.org
Subject: Re: Record type in sql
Date: Mon, 17 Jan 2005 13:48:49 +0100
Message-ID: <ED4E30DD9C43D5118DFB00508BBBA76EB1655D@neptun.sonorys.at> (raw)

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.din@easynet.ro]
> Sent: Montag, 17. Jänner 2005 13:31
> To: pgsql-sql@postgresql.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
> 



view thread (2+ messages)

Message-ID: <ED4E30DD9C43D5118DFB00508BBBA76EB1655D@neptun.sonorys.at>
Permalink:  ../ED4E30DD9C43D5118DFB00508BBBA76EB1655D@neptun.sonorys.at/
Also on:    postgresql.org/message-id/ED4E30DD9C43D5118DFB00508BBBA76EB1655D@neptun.sonorys.at

 · 

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: robert.koepferl@sonorys.at, adrian.din@easynet.ro
  Subject: Re: Record type in sql
  In-Reply-To: <ED4E30DD9C43D5118DFB00508BBBA76EB1655D@neptun.sonorys.at>
  References: <ED4E30DD9C43D5118DFB00508BBBA76EB1655D@neptun.sonorys.at>

* 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