<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/postgresql.git/src/backend/utils/fmgr, branch master</title>
<subtitle>git.postgresql.org: git/postgresql.git
</subtitle>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/postgresql.git/'/>
<entry>
<title>Revert "Add USER SET parameter values for pg_db_role_setting"</title>
<updated>2023-05-17T17:28:57+00:00</updated>
<author>
<name>Alexander Korotkov</name>
<email>akorotkov@postgresql.org</email>
</author>
<published>2023-05-17T17:06:50+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/postgresql.git/commit/?id=b9a7a822723aebb16cbe7e5fb874e5124745b07e'/>
<id>b9a7a822723aebb16cbe7e5fb874e5124745b07e</id>
<content type='text'>
This reverts commit 096dd80f3ccc and its fixups beecbe8e5001, afdd9f7f0e00,
529da086ba, db93e739ac61.

Catversion is bumped.

Discussion: https://postgr.es/m/d46f9265-ff3c-6743-2278-6772598233c2%40pgmasters.net
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commit 096dd80f3ccc and its fixups beecbe8e5001, afdd9f7f0e00,
529da086ba, db93e739ac61.

Catversion is bumped.

Discussion: https://postgr.es/m/d46f9265-ff3c-6743-2278-6772598233c2%40pgmasters.net
</pre>
</div>
</content>
</entry>
<entry>
<title>Add SysCacheGetAttrNotNull for guaranteed not-null attrs</title>
<updated>2023-03-25T21:49:33+00:00</updated>
<author>
<name>Daniel Gustafsson</name>
<email>dgustafsson@postgresql.org</email>
</author>
<published>2023-03-25T21:49:33+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/postgresql.git/commit/?id=d435f15fff3cf3cf5d6cfcfd63e21acc0f737829'/>
<id>d435f15fff3cf3cf5d6cfcfd63e21acc0f737829</id>
<content type='text'>
When extracting an attr from a cached tuple in the syscache with
SysCacheGetAttr the isnull parameter must be checked in case the
attr cannot be NULL.  For cases when this is known beforehand, a
wrapper is introduced which perform the errorhandling internally
on behalf of the caller, invoking an elog in case of a NULL attr.

Reviewed-by: Tom Lane &lt;tgl@sss.pgh.pa.us&gt;
Reviewed-by: Peter Eisentraut &lt;peter.eisentraut@enterprisedb.com&gt;
Reviewed-by: David Rowley &lt;dgrowleyml@gmail.com&gt;
Discussion: https://postgr.es/m/AD76405E-DB45-46B6-941F-17B1EB3A9076@yesql.se
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When extracting an attr from a cached tuple in the syscache with
SysCacheGetAttr the isnull parameter must be checked in case the
attr cannot be NULL.  For cases when this is known beforehand, a
wrapper is introduced which perform the errorhandling internally
on behalf of the caller, invoking an elog in case of a NULL attr.

Reviewed-by: Tom Lane &lt;tgl@sss.pgh.pa.us&gt;
Reviewed-by: Peter Eisentraut &lt;peter.eisentraut@enterprisedb.com&gt;
Reviewed-by: David Rowley &lt;dgrowleyml@gmail.com&gt;
Discussion: https://postgr.es/m/AD76405E-DB45-46B6-941F-17B1EB3A9076@yesql.se
</pre>
</div>
</content>
</entry>
<entry>
<title>Update copyright for 2023</title>
<updated>2023-01-02T20:00:37+00:00</updated>
<author>
<name>Bruce Momjian</name>
<email>bruce@momjian.us</email>
</author>
<published>2023-01-02T20:00:37+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/postgresql.git/commit/?id=c8e1ba736b2b9e8c98d37a5b77c4ed31baf94147'/>
<id>c8e1ba736b2b9e8c98d37a5b77c4ed31baf94147</id>
<content type='text'>
Backpatch-through: 11
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Backpatch-through: 11
</pre>
</div>
</content>
</entry>
<entry>
<title>Convert the reg* input functions to report (most) errors softly.</title>
<updated>2022-12-27T17:26:01+00:00</updated>
<author>
<name>Tom Lane</name>
<email>tgl@sss.pgh.pa.us</email>
</author>
<published>2022-12-27T17:26:01+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/postgresql.git/commit/?id=858e776c84f48841e7e16fba7b690b76e54f3675'/>
<id>858e776c84f48841e7e16fba7b690b76e54f3675</id>
<content type='text'>
This is not really complete, but it catches most cases of practical
interest.  The main omissions are:

* regtype, regprocedure, and regoperator parse type names by
calling the main grammar, so any grammar-detected syntax error
will still be a hard error.  Also, if one includes a type
modifier in such a type specification, errors detected by the
typmodin function will be hard errors.

* Lookup errors are handled just by passing missing_ok = true
to the relevant catalog lookup function.  Because we've used
quite a restrictive definition of "missing_ok", this means that
edge cases such as "the named schema exists, but you lack
USAGE permission on it" are still hard errors.

It would make sense to me to replace most/all missing_ok
parameters with an escontext parameter and then allow these
additional lookup failure cases to be trapped too.  But that's
a job for some other day.

Discussion: https://postgr.es/m/3342239.1671988406@sss.pgh.pa.us
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is not really complete, but it catches most cases of practical
interest.  The main omissions are:

* regtype, regprocedure, and regoperator parse type names by
calling the main grammar, so any grammar-detected syntax error
will still be a hard error.  Also, if one includes a type
modifier in such a type specification, errors detected by the
typmodin function will be hard errors.

* Lookup errors are handled just by passing missing_ok = true
to the relevant catalog lookup function.  Because we've used
quite a restrictive definition of "missing_ok", this means that
edge cases such as "the named schema exists, but you lack
USAGE permission on it" are still hard errors.

It would make sense to me to replace most/all missing_ok
parameters with an escontext parameter and then allow these
additional lookup failure cases to be trapped too.  But that's
a job for some other day.

Discussion: https://postgr.es/m/3342239.1671988406@sss.pgh.pa.us
</pre>
</div>
</content>
</entry>
<entry>
<title>Add copyright notices to meson files</title>
<updated>2022-12-20T12:54:39+00:00</updated>
<author>
<name>Andrew Dunstan</name>
<email>andrew@dunslane.net</email>
</author>
<published>2022-12-20T12:54:39+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/postgresql.git/commit/?id=8284cf5f746f84303eda34d213e89c8439a83a42'/>
<id>8284cf5f746f84303eda34d213e89c8439a83a42</id>
<content type='text'>
Discussion: https://postgr.es/m/222b43a5-2fb3-2c1b-9cd0-375d376c8246@dunslane.net
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Discussion: https://postgr.es/m/222b43a5-2fb3-2c1b-9cd0-375d376c8246@dunslane.net
</pre>
</div>
</content>
</entry>
<entry>
<title>Convert json_in and jsonb_in to report errors softly.</title>
<updated>2022-12-11T16:28:15+00:00</updated>
<author>
<name>Tom Lane</name>
<email>tgl@sss.pgh.pa.us</email>
</author>
<published>2022-12-11T16:28:15+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/postgresql.git/commit/?id=c60c9badba9b4db3155eef081ae0b923f983168c'/>
<id>c60c9badba9b4db3155eef081ae0b923f983168c</id>
<content type='text'>
This requires a bit of further infrastructure-extension to allow
trapping errors reported by numeric_in and pg_unicode_to_server,
but otherwise it's pretty straightforward.

In the case of jsonb_in, we are only capturing errors reported
during the initial "parse" phase.  The value-construction phase
(JsonbValueToJsonb) can also throw errors if assorted implementation
limits are exceeded.  We should improve that, but it seems like a
separable project.

Andrew Dunstan and Tom Lane

Discussion: https://postgr.es/m/3bac9841-fe07-713d-fa42-606c225567d6@dunslane.net
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This requires a bit of further infrastructure-extension to allow
trapping errors reported by numeric_in and pg_unicode_to_server,
but otherwise it's pretty straightforward.

In the case of jsonb_in, we are only capturing errors reported
during the initial "parse" phase.  The value-construction phase
(JsonbValueToJsonb) can also throw errors if assorted implementation
limits are exceeded.  We should improve that, but it seems like a
separable project.

Andrew Dunstan and Tom Lane

Discussion: https://postgr.es/m/3bac9841-fe07-713d-fa42-606c225567d6@dunslane.net
</pre>
</div>
</content>
</entry>
<entry>
<title>Create infrastructure for "soft" error reporting.</title>
<updated>2022-12-09T14:58:38+00:00</updated>
<author>
<name>Tom Lane</name>
<email>tgl@sss.pgh.pa.us</email>
</author>
<published>2022-12-09T14:58:38+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/postgresql.git/commit/?id=d9f7f5d32f201bec61fef8104aafcb77cecb4dcb'/>
<id>d9f7f5d32f201bec61fef8104aafcb77cecb4dcb</id>
<content type='text'>
Postgres' standard mechanism for reporting errors (ereport() or elog())
is used for all sorts of error conditions.  This means that throwing
an exception via ereport(ERROR) requires an expensive transaction or
subtransaction abort and cleanup, since the exception catcher dare not
make many assumptions about what has gone wrong.  There are situations
where we would rather have a lighter-weight mechanism for dealing
with errors that are known to be safe to recover from without a full
transaction cleanup.  This commit creates infrastructure to let us
adapt existing error-reporting code for that purpose.  See the
included documentation changes for details.  Follow-on commits will
provide test code and usage examples.

The near-term plan is to convert most if not all datatype input
functions to report invalid input "softly".  This will enable
implementing some SQL/JSON features cleanly and without the cost
of subtransactions, and it will also allow creating COPY options
to deal with bad input without cancelling the whole COPY.

This patch is mostly by me, but it owes very substantial debt to
earlier work by Nikita Glukhov, Andrew Dunstan, and Amul Sul.
Thanks also to Andres Freund for review.

Discussion: https://postgr.es/m/3bbbb0df-7382-bf87-9737-340ba096e034@postgrespro.ru
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Postgres' standard mechanism for reporting errors (ereport() or elog())
is used for all sorts of error conditions.  This means that throwing
an exception via ereport(ERROR) requires an expensive transaction or
subtransaction abort and cleanup, since the exception catcher dare not
make many assumptions about what has gone wrong.  There are situations
where we would rather have a lighter-weight mechanism for dealing
with errors that are known to be safe to recover from without a full
transaction cleanup.  This commit creates infrastructure to let us
adapt existing error-reporting code for that purpose.  See the
included documentation changes for details.  Follow-on commits will
provide test code and usage examples.

The near-term plan is to convert most if not all datatype input
functions to report invalid input "softly".  This will enable
implementing some SQL/JSON features cleanly and without the cost
of subtransactions, and it will also allow creating COPY options
to deal with bad input without cancelling the whole COPY.

This patch is mostly by me, but it owes very substantial debt to
earlier work by Nikita Glukhov, Andrew Dunstan, and Amul Sul.
Thanks also to Andres Freund for review.

Discussion: https://postgr.es/m/3bbbb0df-7382-bf87-9737-340ba096e034@postgrespro.ru
</pre>
</div>
</content>
</entry>
<entry>
<title>Add USER SET parameter values for pg_db_role_setting</title>
<updated>2022-12-09T10:12:20+00:00</updated>
<author>
<name>Alexander Korotkov</name>
<email>akorotkov@postgresql.org</email>
</author>
<published>2022-12-09T10:12:20+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/postgresql.git/commit/?id=096dd80f3ccc103c8e078fca05e6ccfb2071aa91'/>
<id>096dd80f3ccc103c8e078fca05e6ccfb2071aa91</id>
<content type='text'>
The USER SET flag specifies that the variable should be set on behalf of an
ordinary role.  That lets ordinary roles set placeholder variables, which
permission requirements are not known yet.  Such a value wouldn't be used if
the variable finally appear to require superuser privileges.

The new flags are stored in the pg_db_role_setting.setuser array.  Catversion
is bumped.

This commit is inspired by the previous work by Steve Chavez.

Discussion: https://postgr.es/m/CAPpHfdsLd6E--epnGqXENqLP6dLwuNZrPMcNYb3wJ87WR7UBOQ%40mail.gmail.com
Author: Alexander Korotkov, Steve Chavez
Reviewed-by: Pavel Borisov, Steve Chavez
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The USER SET flag specifies that the variable should be set on behalf of an
ordinary role.  That lets ordinary roles set placeholder variables, which
permission requirements are not known yet.  Such a value wouldn't be used if
the variable finally appear to require superuser privileges.

The new flags are stored in the pg_db_role_setting.setuser array.  Catversion
is bumped.

This commit is inspired by the previous work by Steve Chavez.

Discussion: https://postgr.es/m/CAPpHfdsLd6E--epnGqXENqLP6dLwuNZrPMcNYb3wJ87WR7UBOQ%40mail.gmail.com
Author: Alexander Korotkov, Steve Chavez
Reviewed-by: Pavel Borisov, Steve Chavez
</pre>
</div>
</content>
</entry>
<entry>
<title>Doc: flesh out fmgr/README's description of context-node usage.</title>
<updated>2022-12-03T15:50:39+00:00</updated>
<author>
<name>Tom Lane</name>
<email>tgl@sss.pgh.pa.us</email>
</author>
<published>2022-12-03T15:50:39+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/postgresql.git/commit/?id=29452de7341b0effbc275d7e139ade83cebda69f'/>
<id>29452de7341b0effbc275d7e139ade83cebda69f</id>
<content type='text'>
I wrote this to provide a home for a planned discussion of error
return conventions for non-error-throwing functions.  But it seems
useful as documentation of existing code no matter what becomes of
that proposal, so commit separately.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
I wrote this to provide a home for a planned discussion of error
return conventions for non-error-throwing functions.  But it seems
useful as documentation of existing code no matter what becomes of
that proposal, so commit separately.
</pre>
</div>
</content>
</entry>
<entry>
<title>Refactor aclcheck functions</title>
<updated>2022-11-13T08:02:41+00:00</updated>
<author>
<name>Peter Eisentraut</name>
<email>peter@eisentraut.org</email>
</author>
<published>2022-11-13T07:11:17+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/postgresql.git/commit/?id=c727f511bd7bf3c58063737bcf7a8f331346f253'/>
<id>c727f511bd7bf3c58063737bcf7a8f331346f253</id>
<content type='text'>
Instead of dozens of mostly-duplicate pg_foo_aclcheck() functions,
write one common function object_aclcheck() that can handle almost all
of them.  We already have all the information we need, such as which
system catalog corresponds to which catalog table and which column is
the ACL column.

There are a few pg_foo_aclcheck() that don't work via the generic
function and have special APIs, so those stay as is.

I also changed most pg_foo_aclmask() functions to static functions,
since they are not used outside of aclchk.c.

Reviewed-by: Corey Huinker &lt;corey.huinker@gmail.com&gt;
Reviewed-by: Antonin Houska &lt;ah@cybertec.at&gt;
Discussion: https://www.postgresql.org/message-id/flat/95c30f96-4060-2f48-98b5-a4392d3b6066@enterprisedb.com
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Instead of dozens of mostly-duplicate pg_foo_aclcheck() functions,
write one common function object_aclcheck() that can handle almost all
of them.  We already have all the information we need, such as which
system catalog corresponds to which catalog table and which column is
the ACL column.

There are a few pg_foo_aclcheck() that don't work via the generic
function and have special APIs, so those stay as is.

I also changed most pg_foo_aclmask() functions to static functions,
since they are not used outside of aclchk.c.

Reviewed-by: Corey Huinker &lt;corey.huinker@gmail.com&gt;
Reviewed-by: Antonin Houska &lt;ah@cybertec.at&gt;
Discussion: https://www.postgresql.org/message-id/flat/95c30f96-4060-2f48-98b5-a4392d3b6066@enterprisedb.com
</pre>
</div>
</content>
</entry>
</feed>
