<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/postgresql.git/contrib/seg, branch master</title>
<subtitle>git.postgresql.org: git/postgresql.git
</subtitle>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/postgresql.git/'/>
<entry>
<title>Replace last PushOverrideSearchPath() call with set_config_option().</title>
<updated>2023-05-08T13:14:07+00:00</updated>
<author>
<name>Noah Misch</name>
<email>noah@leadboat.com</email>
</author>
<published>2023-05-08T13:14:07+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/postgresql.git/commit/?id=681d9e4621aac0a9c71364b6f54f00f6d8c4337f'/>
<id>681d9e4621aac0a9c71364b6f54f00f6d8c4337f</id>
<content type='text'>
The two methods don't cooperate, so set_config_option("search_path",
...) has been ineffective under non-empty overrideStack.  This defect
enabled an attacker having database-level CREATE privilege to execute
arbitrary code as the bootstrap superuser.  While that particular attack
requires v13+ for the trusted extension attribute, other attacks are
feasible in all supported versions.

Standardize on the combination of NewGUCNestLevel() and
set_config_option("search_path", ...).  It is newer than
PushOverrideSearchPath(), more-prevalent, and has no known
disadvantages.  The "override" mechanism remains for now, for
compatibility with out-of-tree code.  Users should update such code,
which likely suffers from the same sort of vulnerability closed here.
Back-patch to v11 (all supported versions).

Alexander Lakhin.  Reported by Alexander Lakhin.

Security: CVE-2023-2454
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The two methods don't cooperate, so set_config_option("search_path",
...) has been ineffective under non-empty overrideStack.  This defect
enabled an attacker having database-level CREATE privilege to execute
arbitrary code as the bootstrap superuser.  While that particular attack
requires v13+ for the trusted extension attribute, other attacks are
feasible in all supported versions.

Standardize on the combination of NewGUCNestLevel() and
set_config_option("search_path", ...).  It is newer than
PushOverrideSearchPath(), more-prevalent, and has no known
disadvantages.  The "override" mechanism remains for now, for
compatibility with out-of-tree code.  Users should update such code,
which likely suffers from the same sort of vulnerability closed here.
Back-patch to v11 (all supported versions).

Alexander Lakhin.  Reported by Alexander Lakhin.

Security: CVE-2023-2454
</pre>
</div>
</content>
</entry>
<entry>
<title>Rework pg_input_error_message(), now renamed pg_input_error_info()</title>
<updated>2023-02-27T23:04:13+00:00</updated>
<author>
<name>Michael Paquier</name>
<email>michael@paquier.xyz</email>
</author>
<published>2023-02-27T23:04:13+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/postgresql.git/commit/?id=b8da37b3ada2e547983538b3e49f8079f85ce120'/>
<id>b8da37b3ada2e547983538b3e49f8079f85ce120</id>
<content type='text'>
pg_input_error_info() is now a SQL function able to return a row with
more than just the error message generated for incorrect data type
inputs when these are able to handle soft failures, returning more
contents of ErrorData, as of:
- The error message (same as before).
- The error detail, if set.
- The error hint, if set.
- SQL error code.

All the regression tests that relied on pg_input_error_message() are
updated to reflect the effects of the rename.

Per discussion with Tom Lane and Andrew Dunstan.

Author: Nathan Bossart
Discussion: https://postgr.es/m/139a68e1-bd1f-a9a7-b5fe-0be9845c6311@dunslane.net
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
pg_input_error_info() is now a SQL function able to return a row with
more than just the error message generated for incorrect data type
inputs when these are able to handle soft failures, returning more
contents of ErrorData, as of:
- The error message (same as before).
- The error detail, if set.
- The error hint, if set.
- SQL error code.

All the regression tests that relied on pg_input_error_message() are
updated to reflect the effects of the rename.

Per discussion with Tom Lane and Andrew Dunstan.

Author: Nathan Bossart
Discussion: https://postgr.es/m/139a68e1-bd1f-a9a7-b5fe-0be9845c6311@dunslane.net
</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://trove.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 contrib/seg's input function to report errors softly</title>
<updated>2022-12-23T14:17:24+00:00</updated>
<author>
<name>Andrew Dunstan</name>
<email>andrew@dunslane.net</email>
</author>
<published>2022-12-23T14:17:24+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/postgresql.git/commit/?id=878ce16056c087e2dcd7cc31cd7e4700f407a770'/>
<id>878ce16056c087e2dcd7cc31cd7e4700f407a770</id>
<content type='text'>
Reviewed by Tom Lane

Discussion: https://postgr.es/m/a8dc5700-c341-3ba8-0507-cc09881e6200@dunslane.net
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Reviewed by Tom Lane

Discussion: https://postgr.es/m/a8dc5700-c341-3ba8-0507-cc09881e6200@dunslane.net
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix contrib/seg to be more wary of long input numbers.</title>
<updated>2022-12-21T22:51:50+00:00</updated>
<author>
<name>Tom Lane</name>
<email>tgl@sss.pgh.pa.us</email>
</author>
<published>2022-12-21T22:51:50+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/postgresql.git/commit/?id=701c881f782b93ee29587112390bd3bfe035e78d'/>
<id>701c881f782b93ee29587112390bd3bfe035e78d</id>
<content type='text'>
seg stores the number of significant digits in an input number
in a "char" field.  If char is signed, and the input is more than
127 digits long, the count can read out as negative causing
seg_out() to print garbage (or, if you're really unlucky,
even crash).

To fix, clamp the digit count to be not more than FLT_DIG.
(In theory this loses some information about what the original
input was, but it doesn't seem like useful information; it would
not survive dump/restore in any case.)

Also, in case there are stored values of the seg type containing
bad data, add a clamp in seg_out's restore() subroutine.

Per bug #17725 from Robins Tharakan.  It's been like this
forever, so back-patch to all supported branches.

Discussion: https://postgr.es/m/17725-0a09313b67fbe86e@postgresql.org
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
seg stores the number of significant digits in an input number
in a "char" field.  If char is signed, and the input is more than
127 digits long, the count can read out as negative causing
seg_out() to print garbage (or, if you're really unlucky,
even crash).

To fix, clamp the digit count to be not more than FLT_DIG.
(In theory this loses some information about what the original
input was, but it doesn't seem like useful information; it would
not survive dump/restore in any case.)

Also, in case there are stored values of the seg type containing
bad data, add a clamp in seg_out's restore() subroutine.

Per bug #17725 from Robins Tharakan.  It's been like this
forever, so back-patch to all supported branches.

Discussion: https://postgr.es/m/17725-0a09313b67fbe86e@postgresql.org
</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://trove.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>Use fabsf() instead of Abs() or fabs() where appropriate</title>
<updated>2022-10-08T11:43:26+00:00</updated>
<author>
<name>Peter Eisentraut</name>
<email>peter@eisentraut.org</email>
</author>
<published>2022-10-08T11:41:18+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/postgresql.git/commit/?id=e4c61bedcb791fe79fdc4e96a3a7ab59b0dbacaf'/>
<id>e4c61bedcb791fe79fdc4e96a3a7ab59b0dbacaf</id>
<content type='text'>
This function is new in C99.

Reviewed-by: Zhang Mingli &lt;zmlpostgres@gmail.com&gt;
Reviewed-by: Tom Lane &lt;tgl@sss.pgh.pa.us&gt;
Discussion: https://www.postgresql.org/message-id/flat/4beb42b5-216b-bce8-d452-d924d5794c63%40enterprisedb.com
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This function is new in C99.

Reviewed-by: Zhang Mingli &lt;zmlpostgres@gmail.com&gt;
Reviewed-by: Tom Lane &lt;tgl@sss.pgh.pa.us&gt;
Discussion: https://www.postgresql.org/message-id/flat/4beb42b5-216b-bce8-d452-d924d5794c63%40enterprisedb.com
</pre>
</div>
</content>
</entry>
<entry>
<title>Remove unnecessary uses of Abs()</title>
<updated>2022-10-07T11:29:33+00:00</updated>
<author>
<name>Peter Eisentraut</name>
<email>peter@eisentraut.org</email>
</author>
<published>2022-10-07T11:28:38+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/postgresql.git/commit/?id=f14aad5169baa5e2ac25d49f1d18f9d5cb3bc7f2'/>
<id>f14aad5169baa5e2ac25d49f1d18f9d5cb3bc7f2</id>
<content type='text'>
Use C standard abs() or fabs() instead.

Reviewed-by: Zhang Mingli &lt;zmlpostgres@gmail.com&gt;
Reviewed-by: Tom Lane &lt;tgl@sss.pgh.pa.us&gt;
Discussion: https://www.postgresql.org/message-id/flat/4beb42b5-216b-bce8-d452-d924d5794c63%40enterprisedb.com
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Use C standard abs() or fabs() instead.

Reviewed-by: Zhang Mingli &lt;zmlpostgres@gmail.com&gt;
Reviewed-by: Tom Lane &lt;tgl@sss.pgh.pa.us&gt;
Discussion: https://www.postgresql.org/message-id/flat/4beb42b5-216b-bce8-d452-d924d5794c63%40enterprisedb.com
</pre>
</div>
</content>
</entry>
<entry>
<title>meson: Add windows resource files</title>
<updated>2022-10-05T16:56:05+00:00</updated>
<author>
<name>Andres Freund</name>
<email>andres@anarazel.de</email>
</author>
<published>2022-10-05T16:56:05+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/postgresql.git/commit/?id=902ab2fcef33b1e7c290af8d280e67d9f9212bcf'/>
<id>902ab2fcef33b1e7c290af8d280e67d9f9212bcf</id>
<content type='text'>
The generated resource files aren't exactly the same ones as the old
buildsystems generate. Previously "InternalName" and "OriginalFileName" were
mostly wrong / not set (despite being required), but that was hard to fix in
at least the make build. Additionally, the meson build falls back to a
"auto-generated" description when not set, and doesn't set it in a few cases -
unlikely that anybody looks at these descriptions in detail.

Author: Andres Freund &lt;andres@anarazel.de&gt;
Author: Nazir Bilal Yavuz &lt;byavuz81@gmail.com&gt;
Reviewed-by: Peter Eisentraut &lt;peter.eisentraut@enterprisedb.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The generated resource files aren't exactly the same ones as the old
buildsystems generate. Previously "InternalName" and "OriginalFileName" were
mostly wrong / not set (despite being required), but that was hard to fix in
at least the make build. Additionally, the meson build falls back to a
"auto-generated" description when not set, and doesn't set it in a few cases -
unlikely that anybody looks at these descriptions in detail.

Author: Andres Freund &lt;andres@anarazel.de&gt;
Author: Nazir Bilal Yavuz &lt;byavuz81@gmail.com&gt;
Reviewed-by: Peter Eisentraut &lt;peter.eisentraut@enterprisedb.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Harmonize parameter names in contrib code.</title>
<updated>2022-09-22T20:59:20+00:00</updated>
<author>
<name>Peter Geoghegan</name>
<email>pg@bowt.ie</email>
</author>
<published>2022-09-22T20:59:20+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/postgresql.git/commit/?id=0faf7d933f625eb1668dcaa518b472f722b53a55'/>
<id>0faf7d933f625eb1668dcaa518b472f722b53a55</id>
<content type='text'>
Make sure that function declarations use names that exactly match the
corresponding names from function definitions in contrib code.

Like other recent commits that cleaned up function parameter names, this
commit was written with help from clang-tidy.

Author: Peter Geoghegan &lt;pg@bowt.ie&gt;
Discussion: https://postgr.es/m/CAH2-WznJt9CMM9KJTMjJh_zbL5hD9oX44qdJ4aqZtjFi-zA3Tg@mail.gmail.com
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Make sure that function declarations use names that exactly match the
corresponding names from function definitions in contrib code.

Like other recent commits that cleaned up function parameter names, this
commit was written with help from clang-tidy.

Author: Peter Geoghegan &lt;pg@bowt.ie&gt;
Discussion: https://postgr.es/m/CAH2-WznJt9CMM9KJTMjJh_zbL5hD9oX44qdJ4aqZtjFi-zA3Tg@mail.gmail.com
</pre>
</div>
</content>
</entry>
</feed>
