Re: Schema variables - new implementation for Postgres 15

From: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
To: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
Cc: Julien Rouhaud <rjuju123(at)gmail(dot)com>, Erik Rijkers <er(at)xs4all(dot)nl>, Dean Rasheed <dean(dot)a(dot)rasheed(at)gmail(dot)com>, Joel Jacobson <joel(at)compiler(dot)org>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Schema variables - new implementation for Postgres 15
Date: 2022-08-19 20:53:52
Message-ID: 20220819205352.zhmvvirmddgjheyz@alvherre.pgsql
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> diff --git a/src/backend/parser/parse_relation.c b/src/backend/parser/parse_relation.c
> index f6b740df0a..b3bee39457 100644
> --- a/src/backend/parser/parse_relation.c
> +++ b/src/backend/parser/parse_relation.c
> @@ -3667,8 +3667,8 @@ errorMissingColumn(ParseState *pstate,
> ereport(ERROR,
> (errcode(ERRCODE_UNDEFINED_COLUMN),
> relname ?
> - errmsg("column %s.%s does not exist", relname, colname) :
> - errmsg("column \"%s\" does not exist", colname),
> + errmsg("column or variable %s.%s does not exist", relname, colname) :
> + errmsg("column or variable \"%s\" does not exist", colname),
> state->rfirst ? closestfirst ?
> errhint("Perhaps you meant to reference the column \"%s.%s\".",
> state->rfirst->eref->aliasname, closestfirst) :

This is in your patch 12. I wonder -- if relname is not null, then
surely this is a column and not a variable, right? So only the second
errmsg() here should be changed, and the first one should remain as in
the original.

--
Álvaro Herrera PostgreSQL Developer — https://www.EnterpriseDB.com/

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Justin Pryzby 2022-08-19 21:18:24 FOR EACH ROW triggers, on partitioend tables, with indexes?
Previous Message Nathan Bossart 2022-08-19 20:42:15 Re: [PATCH] Optimize json_lex_string by batching character copying