Re: empty column name in error message

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Amit Langote <amitlangote09(at)gmail(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: empty column name in error message
Date: 2019-12-17 16:21:38
Message-ID: 25805.1576599698@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Amit Langote <amitlangote09(at)gmail(dot)com> writes:
> I wonder if it's worthwhile to fix the following not-so-friendly error message:

> create index on foo ((row(a)));
> ERROR: column "" has pseudo-type record

Ugh. That used to work more nicely:

regression=# create index fooi on foo ((row(a)));
ERROR: column "pg_expression_1" has pseudo-type record

But that was back in 8.4 :-( ... 9.0 and up behave as you show.
I'm guessing we broke it when we rearranged the rules for naming
index expression columns.

> For example, the attached patch makes it this:

> create index on foo ((row(a)));
> ERROR: column "row" has pseudo-type record

Haven't read the patch in any detail yet, but that seems like
an improvement. And I guess we need a test case, or we'll
break it again :-(

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Dave Cramer 2019-12-17 16:38:29 Re: client auth docs seem to have devolved
Previous Message Tom Lane 2019-12-17 16:01:03 Re: client auth docs seem to have devolved