Re: PG12 change to DO UPDATE SET column references

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: James Coleman <jtc331(at)gmail(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: PG12 change to DO UPDATE SET column references
Date: 2024-01-20 17:59:18
Message-ID: 3013697.1705773558@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

James Coleman <jtc331(at)gmail(dot)com> writes:
> I do wonder if it's plausible (and sufficiently easy) to improve the
> error message here. "column 'foo' of relation 'foo'" makes one thing
> that you've written foo.foo, (in my real-world case the error message
> also cut off the sql past "foo.", and so I couldn't even tell if the
> sql was just malformed). At the very least it'd be nice to have a HINT
> here (perhaps just when the relation and column name match).

> Before I look at where it is, Is such an improvement something we'd be
> interested in?

A HINT if the bogus column name (1) matches the relation name and
(2) is field-qualified seems plausible to me. Then it's pretty
likely to be a user misunderstanding about whether to write the
relation name.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2024-01-20 19:01:42 Re: [PATCH] Add support function for containment operators
Previous Message James Coleman 2024-01-20 17:51:30 Re: PG12 change to DO UPDATE SET column references