Re: row_to_json bug with index only scans: empty keys! - Mailing list pgsql-hackers

From Tom Lane
Subject Re: row_to_json bug with index only scans: empty keys!
Date
Msg-id 23873.1415470163@sss.pgh.pa.us
Whole thread Raw
In response to Re: row_to_json bug with index only scans: empty keys!  (Andrew Dunstan <andrew@dunslane.net>)
Responses Re: row_to_json bug with index only scans: empty keys!  (Ross Reedstrom <reedstrm@rice.edu>)
List 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



pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: Add CREATE support to event triggers
Next
From: Sehrope Sarkuni
Date:
Subject: Re: Fw: [GENERAL] PLV8 and JS exports / referencing