Re: CAST(... ON DEFAULT) - WIP build on top of Error-Safe User Functions

From: Corey Huinker <corey(dot)huinker(at)gmail(dot)com>
To: jian he <jian(dot)universality(at)gmail(dot)com>
Cc: Amul Sul <sulamul(at)gmail(dot)com>, Kirill Reshke <reshkekirill(at)gmail(dot)com>, Vik Fearing <vik(at)postgresfriends(dot)org>, Isaac Morland <isaac(dot)morland(at)gmail(dot)com>, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: CAST(... ON DEFAULT) - WIP build on top of Error-Safe User Functions
Date: 2026-03-13 06:10:13
Message-ID: CADkLM=dFZ8-mBJDkiZZ4JadnJy8zLExUoo_b1FOs2Ozrtge=gQ@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

>
>
> To do that, we need to refactor the RangeVarGetRelidExtended function
> to make it error-safe.
> We can also change it as:
>

Ok, thanks.

Hmm, seems we've got a new compile error:

FAILED: [code=1] src/backend/postgres_lib.a.p/executor_execExpr.c.o
cc -Isrc/backend/postgres_lib.a.p -Isrc/include -I../src/include
-I/usr/include/libxml2 -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64
-Wall -Winvalid-pch -O2 -g -fno-strict-aliasing -fwrapv
-fexcess-precision=standard -D_GNU_SOURCE -Wmissing-prototypes
-Wpointer-arith -Werror=vla -Wendif-labels -Wmissing-format-attribute
-Wcast-function-type -Wshadow=compatible-local -Wformat-security
-Wimplicit-fallthrough=5 -Wdeclaration-after-statement
-Wmissing-variable-declarations -Wno-format-truncation
-Wno-stringop-truncation -fPIC -DWITH_GZFILEOP -pthread -DBUILDING_DLL -MD
-MQ src/backend/postgres_lib.a.p/executor_execExpr.c.o -MF
src/backend/postgres_lib.a.p/executor_execExpr.c.o.d -o
src/backend/postgres_lib.a.p/executor_execExpr.c.o -c
../src/backend/executor/execExpr.c
../src/backend/executor/execExpr.c: In function ‘ExecInitQual’:
../src/backend/executor/execExpr.c:269:49: error: ‘escontext’ undeclared
(first use in this function); did you mean ‘errcontext’?
269 | state->escontext = (ErrorSaveContext *) escontext;
| ^~~~~~~~~
| errcontext
../src/backend/executor/execExpr.c:269:49: note: each undeclared identifier
is reported only once for each function it appears in

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message jian he 2026-03-13 06:19:14 Re: CAST(... ON DEFAULT) - WIP build on top of Error-Safe User Functions
Previous Message Yi Ding 2026-03-13 05:51:25 Re:Re: Change COPY ... ON_ERROR ignore to ON_ERROR ignore_row