Re: Schema variables - new implementation for Postgres 15

Pavel Stehule <pavel.stehule@gmail.com>

From: Pavel Stehule <pavel.stehule@gmail.com>
To: Alvaro Herrera <alvherre@alvh.no-ip.org>
Cc: Julien Rouhaud <rjuju123@gmail.com>, Erik Rijkers <er@xs4all.nl>, Dean Rasheed <dean.a.rasheed@gmail.com>, Joel Jacobson <joel@compiler.org>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2022-08-20T18:10:39Z
Lists: pgsql-hackers

Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. Allow underscores in integer and numeric constants.

  2. Remove special outfuncs/readfuncs handling of RangeVar.catalogname.

  3. Remove extra space from dumped ALTER DEFAULT PRIVILEGES.

  4. Create FKs properly when attaching table as partition

  5. psql: improve tab-complete's handling of variant SQL names.

pá 19. 8. 2022 v 22:54 odesílatel Alvaro Herrera <alvherre@alvh.no-ip.org>
napsal:

> > 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.
>

Yes, it should work. I changed it in today patch

Thank you for tip

Regards

Pavel


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