Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
4023235
Fix PostgreSQL::Test aliasing for Perl v5.10.1.
nmisch Jun 25, 2022
9d4f5ce
Don't trust signalfd() on illumos.
macdice Jun 25, 2022
2d56f55
Fix visibility check when XID is committed in CLOG but not in procarray.
hlinnaka Jun 27, 2022
4a21e34
ecpglib: call newlocale() once per process.
nmisch Jul 2, 2022
beb3fe1
Fix previous commit's ecpg_clocale for ppc Darwin.
nmisch Jul 3, 2022
e63ad5a
libpq: Improve idle state handling in pipeline mode
alvherre Jul 5, 2022
8ac5b3b
Fix pg_upgrade to detect non-upgradable anyarray usages.
tglsfdc Jul 5, 2022
37c82c2
Tighten pg_upgrade's new check for non-upgradable anyarray usages.
tglsfdc Jul 5, 2022
d697551
fix ecpglib patch
reshke Feb 7, 2026
58a2d89
doc: add examples for array_length() and jsonb_array_length()
bmomjian Jul 9, 2022
3909488
doc: Fix inconsistent quotes in some jsonb fields
michaelpq Jul 11, 2022
da8b481
Invent qsort_interruptible().
tglsfdc Jul 12, 2022
440b207
Plug memory leak
alvherre Jul 13, 2022
b35a7b5
doc: mention the pg_locks lock names in parentheses
bmomjian Jul 14, 2022
c31bfee
doc: mention that INSERT can block because of unique indexes
bmomjian Jul 14, 2022
204007f
doc: clarify that "excluded" ON CONFLICT is a single row
bmomjian Jul 14, 2022
fef96ba
doc: clarify the behavior of identically-named savepoints
bmomjian Jul 14, 2022
2074a16
doc: add documentation about ecpg Oracle-compatibility mode
bmomjian Jul 14, 2022
1411e9e
pg_upgrade doc: mention that replication slots must be recreated
bmomjian Jul 14, 2022
a9a1a28
doc: clarify how dropping of extensions affects dependent objs.
bmomjian Jul 14, 2022
c5ff9f7
docs: make monitoring "phases" table titles consistent
bmomjian Jul 15, 2022
cf827d8
Clarify that pg_dump takes ACCESS SHARE lock
j-naylor Jul 1, 2022
116fb0c
Fix omissions in support for the "regcollation" type.
tglsfdc Jul 17, 2022
3bea0b5
pg_upgrade: Adjust quoting style in message to match guidelines
petere Jul 18, 2022
72e7b6e
Re-add SPICleanup for ABI compatibility in stable branch
petere Jul 18, 2022
1878700
Fix ruleutils issues with dropped cols in functions-returning-composite.
tglsfdc Jul 21, 2022
c412a5c
doc: clarify that auth. names are lower case and case-sensitive
bmomjian Jul 21, 2022
a9f1cd9
doc: use wording "restore" instead of "reload" of dumps
bmomjian Jul 21, 2022
33fda3e
postgres_fdw: Fix bug in checking of return value of PQsendQuery().
MasaoFujii Jul 21, 2022
e550de9
Fix get_dirent_type() for Windows junction points.
macdice Jul 22, 2022
1e2d228
Doc: improve documentation about random().
tglsfdc Jul 23, 2022
1110ddd
Fix ReadRecentBuffer for local buffers.
hlinnaka Jul 25, 2022
8f5b6c0
Allow "in place" tablespaces.
alvherre Jul 27, 2022
a46fdd9
Fix get_dirent_type() for symlinks on MinGW/MSYS.
macdice Jul 28, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion contrib/postgres_fdw/postgres_fdw.c
Original file line number Diff line number Diff line change
Expand Up @@ -7167,7 +7167,7 @@ fetch_more_data_begin(AsyncRequest *areq)
snprintf(sql, sizeof(sql), "FETCH %d FROM c%u",
fsstate->fetch_size, fsstate->cursor_number);

if (PQsendQuery(fsstate->conn, sql) < 0)
if (!PQsendQuery(fsstate->conn, sql))
pgfdw_report_error(ERROR, NULL, fsstate->conn, false, fsstate->query);

/* Remember that the request is in process */
Expand Down
4 changes: 3 additions & 1 deletion doc/src/sgml/client-auth.sgml
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,9 @@ hostnogssenc <replaceable>database</replaceable> <replaceable>user</replaceabl
<para>
Specifies the authentication method to use when a connection matches
this record. The possible choices are summarized here; details
are in <xref linkend="auth-methods"/>.
are in <xref linkend="auth-methods"/>. All the options
are lower case and treated case sensitively, so even acronyms like
<literal>ldap</literal> must be specified as lower case.

<variablelist>
<varlistentry>
Expand Down
19 changes: 19 additions & 0 deletions doc/src/sgml/config.sgml
Original file line number Diff line number Diff line change
Expand Up @@ -10458,6 +10458,25 @@ dynamic_library_path = 'C:\tools\postgresql;H:\my_project\lib;$libdir'
</para>

<variablelist>
<varlistentry id="guc-allow-in-place-tablespaces" xreflabel="allow_in_place_tablespaces">
<term><varname>allow_in_place_tablespaces</varname> (<type>boolean</type>)
<indexterm>
<primary><varname>allow_in_place_tablespaces</varname> configuration parameter</primary>
</indexterm>
</term>
<listitem>
<para>
Allows tablespaces to be created as directories inside
<filename>pg_tblspc</filename>, when an empty location string
is provided to the <command>CREATE TABLESPACE</command> command. This
is intended to allow testing replication scenarios where primary and
standby servers are running on the same machine. Such directories
are likely to confuse backup tools that expect to find only symbolic
links in that location. Only superusers can change this setting.
</para>
</listitem>
</varlistentry>

<varlistentry id="guc-allow-system-table-mods" xreflabel="allow_system_table_mods">
<term><varname>allow_system_table_mods</varname> (<type>boolean</type>)
<indexterm>
Expand Down
10 changes: 5 additions & 5 deletions doc/src/sgml/ddl.sgml
Original file line number Diff line number Diff line change
Expand Up @@ -557,7 +557,7 @@ CREATE TABLE products (
tests, it cannot guarantee that the database will not reach a state
in which the constraint condition is false (due to subsequent changes
of the other row(s) involved). This would cause a database dump and
reload to fail. The reload could fail even when the complete
restore to fail. The restore could fail even when the complete
database state is consistent with the constraint, due to rows not
being loaded in an order that will satisfy the constraint. If
possible, use <literal>UNIQUE</literal>, <literal>EXCLUDE</literal>,
Expand All @@ -569,10 +569,10 @@ CREATE TABLE products (
If what you desire is a one-time check against other rows at row
insertion, rather than a continuously-maintained consistency
guarantee, a custom <link linkend="triggers">trigger</link> can be used
to implement that. (This approach avoids the dump/reload problem because
to implement that. (This approach avoids the dump/restore problem because
<application>pg_dump</application> does not reinstall triggers until after
reloading data, so that the check will not be enforced during a
dump/reload.)
restoring data, so that the check will not be enforced during a
dump/restore.)
</para>
</note>

Expand All @@ -594,7 +594,7 @@ CREATE TABLE products (
function. <productname>PostgreSQL</productname> does not disallow
that, but it will not notice if there are rows in the table that now
violate the <literal>CHECK</literal> constraint. That would cause a
subsequent database dump and reload to fail.
subsequent database dump and restore to fail.
The recommended way to handle such a change is to drop the constraint
(using <command>ALTER TABLE</command>), adjust the function definition,
and re-add the constraint, thereby rechecking it against all table rows.
Expand Down
39 changes: 38 additions & 1 deletion doc/src/sgml/ecpg.sgml
Original file line number Diff line number Diff line change
Expand Up @@ -1890,7 +1890,8 @@ EXEC SQL SELECT b INTO :val :val_ind FROM test1;
</programlisting>
The indicator variable <varname>val_ind</varname> will be zero if
the value was not null, and it will be negative if the value was
null.
null. (See <xref linkend="ecpg-oracle-compat"/> to enable
Oracle-specific behavior.)
</para>

<para>
Expand Down Expand Up @@ -9801,6 +9802,42 @@ risnull(CINTTYPE, (char *) &i);
</sect2>
</sect1>

<sect1 id="ecpg-oracle-compat">
<title><productname>Oracle</productname> Compatibility Mode</title>
<para>
<command>ecpg</command> can be run in a so-called <firstterm>Oracle
compatibility mode</firstterm>. If this mode is active, it tries to
behave as if it were Oracle <productname>Pro*C</productname>.
</para>

<para>
Specifically, this mode changes <command>ecpg</command> in three ways:

<itemizedlist>
<listitem>
<para>
Pad character arrays receiving character string types with
trailing spaces to the specified length
</para>
</listitem>

<listitem>
<para>
Zero byte terminate these character arrays, and set the indicator
variable if truncation occurs
</para>
</listitem>

<listitem>
<para>
Set the null indicator to <literal>-1</literal> when character
arrays receive empty character string types
</para>
</listitem>
</itemizedlist>
</para>
</sect1>

<sect1 id="ecpg-develop">
<title>Internals</title>

Expand Down
2 changes: 1 addition & 1 deletion doc/src/sgml/extend.sgml
Original file line number Diff line number Diff line change
Expand Up @@ -982,7 +982,7 @@ SET LOCAL search_path TO @extschema@, pg_temp;
<application>pg_dump</application>. But that behavior is undesirable for a
configuration table; any data changes made by the user need to be
included in dumps, or the extension will behave differently after a dump
and reload.
and restore.
</para>

<indexterm>
Expand Down
16 changes: 16 additions & 0 deletions doc/src/sgml/func.sgml
Original file line number Diff line number Diff line change
Expand Up @@ -1840,6 +1840,9 @@ repeat('Pg', 4) <returnvalue>PgPgPgPg</returnvalue>
subsequent <function>random()</function> calls in the current session
can be repeated by re-issuing <function>setseed()</function> with the same
argument.
Without any prior <function>setseed()</function> call in the same
session, the first <function>random()</function> call obtains a seed
from a platform-dependent source of random bits.
</para>

<para>
Expand Down Expand Up @@ -15446,6 +15449,10 @@ table2-mapping
<para>
<literal>json_array_length('[1,2,3,{"f1":1,"f2":[5,6]},4]')</literal>
<returnvalue>5</returnvalue>
</para>
<para>
<literal>jsonb_array_length('[]')</literal>
<returnvalue>0</returnvalue>
</para></entry>
</row>

Expand Down Expand Up @@ -17887,10 +17894,19 @@ SELECT NULLIF(value, '(none)') ...
</para>
<para>
Returns the length of the requested array dimension.
(Produces NULL instead of 0 for empty or missing array dimensions.)
</para>
<para>
<literal>array_length(array[1,2,3], 1)</literal>
<returnvalue>3</returnvalue>
</para>
<para>
<literal>array_length(array[]::int[], 1)</literal>
<returnvalue>NULL</returnvalue>
</para>
<para>
<literal>array_length(array['text'], 2)</literal>
<returnvalue>NULL</returnvalue>
</para></entry>
</row>

Expand Down
4 changes: 2 additions & 2 deletions doc/src/sgml/json.sgml
Original file line number Diff line number Diff line change
Expand Up @@ -701,10 +701,10 @@ UPDATE table_name SET jsonb_field[2] = '2';
assigned value can be placed.

<programlisting>
-- Where jsonb_field was {}, it is now {'a': [{'b': 1}]}
-- Where jsonb_field was {}, it is now {"a": [{"b": 1}]}
UPDATE table_name SET jsonb_field['a'][0]['b'] = '1';

-- Where jsonb_field was [], it is now [null, {'a': 1}]
-- Where jsonb_field was [], it is now [null, {"a": 1}]
UPDATE table_name SET jsonb_field[1]['a'] = '1';
</programlisting>

Expand Down
4 changes: 2 additions & 2 deletions doc/src/sgml/monitoring.sgml
Original file line number Diff line number Diff line change
Expand Up @@ -5607,7 +5607,7 @@ SELECT pg_stat_get_backend_pid(s.backendid) AS pid,
</table>

<table id="analyze-phases">
<title>ANALYZE phases</title>
<title>ANALYZE Phases</title>
<tgroup cols="2">
<colspec colname="col1" colwidth="1*"/>
<colspec colname="col2" colwidth="2*"/>
Expand Down Expand Up @@ -6537,7 +6537,7 @@ SELECT pg_stat_get_backend_pid(s.backendid) AS pid,
</table>

<table id="basebackup-phases">
<title>Base backup phases</title>
<title>Base Backup Phases</title>
<tgroup cols="2">
<colspec colname="col1" colwidth="1*"/>
<colspec colname="col2" colwidth="2*"/>
Expand Down
16 changes: 8 additions & 8 deletions doc/src/sgml/mvcc.sgml
Original file line number Diff line number Diff line change
Expand Up @@ -875,7 +875,7 @@ ERROR: could not serialize access due to read/write dependencies among transact
<title>Table-Level Lock Modes</title>
<varlistentry>
<term>
<literal>ACCESS SHARE</literal>
<literal>ACCESS SHARE</literal> (<literal>AccessShareLock</literal>)
</term>
<listitem>
<para>
Expand All @@ -893,7 +893,7 @@ ERROR: could not serialize access due to read/write dependencies among transact

<varlistentry>
<term>
<literal>ROW SHARE</literal>
<literal>ROW SHARE</literal> (<literal>RowShareLock</literal>)
</term>
<listitem>
<para>
Expand All @@ -914,7 +914,7 @@ ERROR: could not serialize access due to read/write dependencies among transact

<varlistentry>
<term>
<literal>ROW EXCLUSIVE</literal>
<literal>ROW EXCLUSIVE</literal> (<literal>RowExclusiveLock</literal>)
</term>
<listitem>
<para>
Expand All @@ -936,7 +936,7 @@ ERROR: could not serialize access due to read/write dependencies among transact

<varlistentry>
<term>
<literal>SHARE UPDATE EXCLUSIVE</literal>
<literal>SHARE UPDATE EXCLUSIVE</literal> (<literal>ShareUpdateExclusiveLock</literal>)
</term>
<listitem>
<para>
Expand All @@ -962,7 +962,7 @@ ERROR: could not serialize access due to read/write dependencies among transact

<varlistentry>
<term>
<literal>SHARE</literal>
<literal>SHARE</literal> (<literal>ShareLock</literal>)
</term>
<listitem>
<para>
Expand All @@ -982,7 +982,7 @@ ERROR: could not serialize access due to read/write dependencies among transact

<varlistentry>
<term>
<literal>SHARE ROW EXCLUSIVE</literal>
<literal>SHARE ROW EXCLUSIVE</literal> (<literal>ShareRowExclusiveLock</literal>)
</term>
<listitem>
<para>
Expand All @@ -1004,7 +1004,7 @@ ERROR: could not serialize access due to read/write dependencies among transact

<varlistentry>
<term>
<literal>EXCLUSIVE</literal>
<literal>EXCLUSIVE</literal> (<literal>ExclusiveLock</literal>)
</term>
<listitem>
<para>
Expand All @@ -1026,7 +1026,7 @@ ERROR: could not serialize access due to read/write dependencies among transact

<varlistentry>
<term>
<literal>ACCESS EXCLUSIVE</literal>
<literal>ACCESS EXCLUSIVE</literal> (<literal>AccessExclusiveLock</literal>)
</term>
<listitem>
<para>
Expand Down
2 changes: 1 addition & 1 deletion doc/src/sgml/perform.sgml
Original file line number Diff line number Diff line change
Expand Up @@ -1785,7 +1785,7 @@ SELECT * FROM x, y, a, b, c WHERE something AND somethingelse;

<para>
Dump scripts generated by <application>pg_dump</application> automatically apply
several, but not all, of the above guidelines. To reload a
several, but not all, of the above guidelines. To restore a
<application>pg_dump</application> dump as quickly as possible, you need to
do a few extra things manually. (Note that these points apply while
<emphasis>restoring</emphasis> a dump, not while <emphasis>creating</emphasis> it.
Expand Down
2 changes: 1 addition & 1 deletion doc/src/sgml/plhandler.sgml
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@
attached to a function when <varname>check_function_bodies</varname> is on.
Therefore, checks whose results might be affected by GUC parameters
definitely should be skipped when <varname>check_function_bodies</varname> is
off, to avoid false failures when reloading a dump.
off, to avoid false failures when restoring a dump.
</para>

<para>
Expand Down
6 changes: 4 additions & 2 deletions doc/src/sgml/ref/alter_function.sgml
Original file line number Diff line number Diff line change
Expand Up @@ -161,8 +161,10 @@ ALTER FUNCTION <replaceable>name</replaceable> [ ( [ [ <replaceable class="param
<para>
This form marks the function as dependent on the extension, or no longer
dependent on that extension if <literal>NO</literal> is specified.
A function that's marked as dependent on an extension is automatically
dropped when the extension is dropped.
A function that's marked as dependent on an extension is dropped when the
extension is dropped, even if <literal>CASCADE</literal> is not specified.
A function can depend upon multiple extensions, and will be dropped when
any one of those extensions is dropped.
</para>
</listitem>
</varlistentry>
Expand Down
7 changes: 6 additions & 1 deletion doc/src/sgml/ref/alter_procedure.sgml
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,12 @@ ALTER PROCEDURE <replaceable>name</replaceable> [ ( [ [ <replaceable class="para
<term><replaceable class="parameter">extension_name</replaceable></term>
<listitem>
<para>
The name of the extension that the procedure is to depend on.
This form marks the procedure as dependent on the extension, or no longer
dependent on the extension if <literal>NO</literal> is specified.
A procedure that's marked as dependent on an extension is dropped when the
extension is dropped, even if cascade is not specified.
A procedure can depend upon multiple extensions, and will be dropped when
any one of those extensions is dropped.
</para>
</listitem>
</varlistentry>
Expand Down
2 changes: 1 addition & 1 deletion doc/src/sgml/ref/alter_type.sgml
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,7 @@ ALTER TYPE <replaceable class="parameter">name</replaceable> SET ( <replaceable
around</quote> since the original creation of the enum type). The slowdown is
usually insignificant; but if it matters, optimal performance can be
regained by dropping and recreating the enum type, or by dumping and
reloading the database.
restoring the database.
</para>
</refsect1>

Expand Down
2 changes: 1 addition & 1 deletion doc/src/sgml/ref/create_domain.sgml
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ INSERT INTO tab (domcol) VALUES ((SELECT domcol FROM tab WHERE false));
function. <productname>PostgreSQL</productname> does not disallow that,
but it will not notice if there are stored values of the domain type that
now violate the <literal>CHECK</literal> constraint. That would cause a
subsequent database dump and reload to fail. The recommended way to
subsequent database dump and restore to fail. The recommended way to
handle such a change is to drop the constraint (using <command>ALTER
DOMAIN</command>), adjust the function definition, and re-add the
constraint, thereby rechecking it against stored data.
Expand Down
10 changes: 6 additions & 4 deletions doc/src/sgml/ref/drop_extension.sgml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@ DROP EXTENSION [ IF EXISTS ] <replaceable class="parameter">name</replaceable> [

<para>
<command>DROP EXTENSION</command> removes extensions from the database.
Dropping an extension causes its component objects to be dropped as well.
Dropping an extension causes its component objects, and other explicitly
dependent routines (see <xref linkend="sql-alterroutine"/>,
the depends on extension action), to be dropped as well.
</para>

<para>
Expand Down Expand Up @@ -77,9 +79,9 @@ DROP EXTENSION [ IF EXISTS ] <replaceable class="parameter">name</replaceable> [
<term><literal>RESTRICT</literal></term>
<listitem>
<para>
Refuse to drop the extension if any objects depend on it (other than
its own member objects and other extensions listed in the same
<command>DROP</command> command). This is the default.
This option prevents the specified extensions from being dropped
if there exists non-extension-member objects that depends on any
the extensions. This is the default.
</para>
</listitem>
</varlistentry>
Expand Down
Loading
Loading