Re: How to rename each field in ROW expression?

From: Itagaki Takahiro <itagaki(dot)takahiro(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: How to rename each field in ROW expression?
Date: 2010-11-15 23:41:55
Message-ID: AANLkTim1n3skp9u0hu_F8sQKEjaXdDgfzxsSd5QrnRRG@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Nov 16, 2010 at 00:18, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Why?  It's an anonymous type, you shouldn't care about names.
> If you do, make a real named rowtype.

If so, we cannot extract any fields in an anonymous type, right?
We cannot lookup fields with (an anonymous type).name because
the fields have no names.

=# SELECT (ROW(123, 'ABC', NULL)).*;
ERROR: record type has not been registered

--
Itagaki Takahiro

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2010-11-15 23:42:49 Re: libpq changes for synchronous replication
Previous Message Pavel Stehule 2010-11-15 22:13:55 Re: Per-column collation