X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 3FFC53A3B58 for ; Mon, 17 Jan 2005 12:49:04 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 94654-01 for ; Mon, 17 Jan 2005 12:48:55 +0000 (GMT) Received: from mx-00.sil.at (mx-00.sil.at [62.116.68.196]) by svr1.postgresql.org (Postfix) with ESMTP id 01C113A18BC for ; Mon, 17 Jan 2005 12:48:56 +0000 (GMT) Received: (qmail-ldap/ctrl 19854 invoked from network); 17 Jan 2005 12:48:53 -0000 Received: from unknown (HELO jupiter.sonorys.at) ([213.235.243.42]) (envelope-sender ) by mx-00.sil.at (qmail-ldap-1.03) with SMTP for ; 17 Jan 2005 12:48:53 -0000 Received: from neptun.sonorys.at (neptun.sonorys.at [172.24.1.17]) by jupiter.sonorys.at (8.11.7+Sun/8.11.7) with ESMTP id j0HCn6s15263; Mon, 17 Jan 2005 13:49:06 +0100 (MET) Received: by neptun.sonorys.at with Internet Mail Service (5.5.2653.19) id ; Mon, 17 Jan 2005 13:48:55 +0100 Message-ID: From: =?iso-8859-15?Q?K=D6PFERL_Robert?= To: "'Din Adrian'" , pgsql-sql@postgresql.org Subject: Re: Record type in sql Date: Mon, 17 Jan 2005 13:48:49 +0100 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) Content-Type: text/plain; charset="iso-8859-15" Content-Transfer-Encoding: quoted-printable X-Virus-Scanned: by amavisd-new at hub.org X-Archive-Number: 200501/120 X-Sequence-Number: 19908 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=E4nner 2005 13:31 > To: pgsql-sql@postgresql.org > Subject: [SQL] Record type in sql=20 >=20 >=20 > Hello, > I have a little problem > I want to declare a type record for later use like that >=20 > create type record_structure1 as (id int2, nume text); > that is ok! >=20 > next in a function I want to use something like that: >=20 > select * from table as record_structure1 ? > instead of writing > select * from table as t1(id int2, nume text); > is this possible? >=20 > Thank You, > Adrian Din >=20 > --=20 > Using Opera's revolutionary e-mail client: http://www.opera.com/m2/ >=20 > ---------------------------(end of=20 > broadcast)--------------------------- > TIP 9: the planner will ignore your desire to choose an index=20 > scan if your > joining column's datatypes do not match >=20