Re: Expression to construct a anonymous record with named columns?

From: Alban Hertroys <haramrae(at)gmail(dot)com>
To: Merlin Moncure <mmoncure(at)gmail(dot)com>
Cc: Benedikt Grundmann <benedikt(dot)grundmann(at)gmail(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: Expression to construct a anonymous record with named columns?
Date: 2012-09-21 15:27:39
Message-ID: CAF-3MvP4UVd+du334G=qnQQ_1d6eQLeRaswPvg5MX-BDqm0+Dg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

> select * from (values (1, 2, 3)) x (a, b, c);
> select x.* from (values (1, 2, 3)) x (a, b, c);

And more fun with values:
select a, b, c from (values (1, 2, 3), (4, 5, 6), (7, 8, 9)) x (a, b, c);

--
If you can't see the forest for the trees,
Cut the trees and you'll see there is no forest.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Scott Marlowe 2012-09-21 16:33:25 Re: Windows Services and Postgresql 9.1.3
Previous Message Anibal David Acosta 2012-09-21 15:06:44 Re: [ADMIN] Windows Services and Postgresql 9.1.3