Re: row_to_json bug with index only scans: empty keys!

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Ross Reedstrom <reedstrm(at)rice(dot)edu>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: row_to_json bug with index only scans: empty keys!
Date: 2014-11-08 18:09:23
Message-ID: 23873.1415470163@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Oh, some more fun: a RowExpr that's labeled with a named composite type
(rather than RECORD) has the same issue of not respecting aliases.
Continuing previous example with table "foo":

regression=# create view vv as select * from foo;
CREATE VIEW
regression=# select row_to_json(q) from vv q;
row_to_json
-----------------
{"f1":1,"f2":2}
(1 row)

regression=# select row_to_json(q) from vv q(a,b);
row_to_json
-----------------
{"f1":1,"f2":2}
(1 row)

So that's another case we probably want to change in HEAD but not the back
branches.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Sehrope Sarkuni 2014-11-08 19:23:08 Re: Fw: [GENERAL] PLV8 and JS exports / referencing
Previous Message Andres Freund 2014-11-08 18:05:43 Re: Add CREATE support to event triggers