Commit Graph

11714 Commits

Author SHA1 Message Date
Tom Lane c10bb239d2 Stamp 9.3.25. 2018-11-05 16:53:28 -05:00
Tom Lane 89c563f1bb Release notes for 11.1, 10.6, 9.6.11, 9.5.15, 9.4.20, 9.3.25. 2018-11-04 16:57:15 -05:00
Tom Lane 1aad3a724a Yet further rethinking of build changes for macOS Mojave.
The solution arrived at in commit e74dd00f5 presumes that the compiler
has a suitable default -isysroot setting ... but further experience
shows that in many combinations of macOS version, XCode version, Xcode
command line tools version, and phase of the moon, Apple's compiler
will *not* supply a default -isysroot value.

We could potentially go back to the approach used in commit 68fc227dd,
but I don't have a lot of faith in the reliability or life expectancy of
that either.  Let's just revert to the approach already shipped in 11.0,
namely specifying an -isysroot switch globally.  As a partial response to
the concerns raised by Jakob Egger, adjust the contents of Makefile.global
to look like

CPPFLAGS = -isysroot $(PG_SYSROOT) ...
PG_SYSROOT = /path/to/sysroot

This allows overriding the sysroot path at build time in a relatively
painless way.

Add documentation to installation.sgml about how to use the PG_SYSROOT
option.  I also took the opportunity to document how to work around
macOS's "System Integrity Protection" feature.

As before, back-patch to all supported versions.

Discussion: https://postgr.es/m/20840.1537850987@sss.pgh.pa.us
2018-11-02 18:54:00 -04:00
Bruce Momjian 471ae731c1 docs: adjust simpler language for NULL return from ANY/ALL
Adjustment to commit 8610c973dd.

Reported-by: Tom Lane

Discussion: https://postgr.es/m/17406.1541168421@sss.pgh.pa.us

Backpatch-through: 9.3
2018-11-02 13:05:30 -04:00
Bruce Momjian 7fc0c4c9ec GUC: adjust effective_cache_size docs and SQL description
Clarify that effective_cache_size is both kernel buffers and shared
buffers.

Reported-by: nat@makarevitch.org

Discussion: https://postgr.es/m/153685164808.22334.15432535018443165207@wrigleys.postgresql.org

Backpatch-through: 9.3
2018-11-02 09:10:59 -04:00
Bruce Momjian f499dabbd5 doc: use simpler language for NULL return from ANY/ALL
Previously the combination of "does not return" and "any row" caused
ambiguity.

Reported-by: KES <kes-kes@yandex.ru>

Discussion: https://postgr.es/m/153701242703.22334.1476830122267077397@wrigleys.postgresql.org

Reviewed-by: David G. Johnston

Backpatch-through: 9.3
2018-11-02 08:54:33 -04:00
Tom Lane 82dd1c2714 Fix memory leak in repeated SPGIST index scans.
spgendscan neglected to pfree all the memory allocated by spgbeginscan.
It's possible to get away with that in most normal queries, since the
memory is allocated in the executor's per-query context which is about
to get deleted anyway; but it causes severe memory leakage during
creation or filling of large exclusion-constraint indexes.

Also, document that amendscan is supposed to free what ambeginscan
allocates.  The docs' lack of clarity on that point probably caused this
bug to begin with.  (There is discussion of changing that API spec going
forward, but I don't think it'd be appropriate for the back branches.)

Per report from Bruno Wolff.  It's been like this since the beginning,
so back-patch to all active branches.

In HEAD, also fix an independent leak caused by commit 2a6368343
(allocating memory during spgrescan instead of spgbeginscan, which
might be all right if it got cleaned up, but it didn't).  And do a bit
of code beautification on that commit, too.

Discussion: https://postgr.es/m/20181024012314.GA27428@wolff.to
2018-10-31 17:04:43 -04:00
Magnus Hagander bd3fc725b2 Fix missing whitespace in pg_dump ref page
Author: Daniel Gustafsson <daniel@yesql.se>
2018-10-29 12:36:49 +01:00
Michael Paquier 4b2fb124d1 Fix documentation of pgrowlocks using "lock_type" instead of "modes"
The example used in the documentation is outdated as well.  This is an
oversight from 0ac5ad5, which bumped up pgrowlocks but forgot some bits
of the documentation.

Reported-by: Chris Wilson
Discussion: https://postgr.es/m/153838692816.2950.12001142346234155699@wrigleys.postgresql.org
Backpatch-through: 9.3
2018-10-02 16:37:16 +09:00
Bruce Momjian dabdc7e903 docs: remove use of escape strings and use bytea hex output
standard_conforming_strings defaulted to 'on' in PG 9.1.
bytea_output defaulted to 'hex' in PG 9.0.

Reported-by: André Hänsel

Discussion: https://postgr.es/m/12e601d447ac$345994a0$9d0cbde0$@webkr.de

Backpatch-through: 9.3
2018-09-21 19:55:06 -04:00
Peter Eisentraut 6884491bd8 doc: Update broken links
Discussion: https://www.postgresql.org/message-id/flat/153044458767.13254.16049977382403131287%40wrigleys.postgresql.org
2018-09-13 08:52:49 +02:00
Andrew Dunstan 48c978f3ed Support building with Visual Studio 2017
Haribabu Kommi, reviewed by Takeshi Ideriha and Christian Ullrich

Now backpatched to 9.4 and 9.3
2018-09-11 16:05:20 -04:00
Andrew Dunstan 0482578328 Support building with Visual Studio 2015
Adjust the way we detect the locale. As a result the minumum Windows
version supported by VS2015 and later is Windows Vista. Add some tweaks
to remove new compiler warnings. Remove documentation references to the
now obsolete msysGit.

Michael Paquier, somewhat edited by me, reviewed by Christian Ullrich.

Rather belated backpatch to 9.4 and 9.3
2018-09-11 15:46:35 -04:00
Tom Lane 25ff97ba77 Make contrib/unaccent's unaccent() function work when not in search path.
Since the fixes for CVE-2018-1058, we've advised people to schema-qualify
function references in order to fix failures in code that executes under
a minimal search_path setting.  However, that's insufficient to make the
single-argument form of unaccent() work, because it looks up the "unaccent"
text search dictionary using the search path.

The most expedient answer seems to be to remove the search_path dependency
by making it look in the same schema that the unaccent() function itself
is declared in.  This will definitely work for the normal usage of this
function with the unaccent dictionary provided by the extension.
It's barely possible that there are people who were relying on the
search-path-dependent behavior to select other dictionaries with the same
name; but if there are any such people at all, they can still get that
behavior by writing unaccent('unaccent', ...), or possibly
unaccent('unaccent'::text::regdictionary, ...) if the lookup has to be
postponed to runtime.

Per complaint from Gunnlaugur Thor Briem.  Back-patch to all supported
branches.

Discussion: https://postgr.es/m/CAPs+M8LCex6d=DeneofdsoJVijaG59m9V0ggbb3pOH7hZO4+cQ@mail.gmail.com
2018-09-06 10:49:45 -04:00
Bruce Momjian 630d4451ad docs: improve AT TIME ZONE description
The previous description was unclear.  Also add a third example, change
use of time zone acronyms to more verbose descriptions, and add a
mention that using 'time' with AT TIME ZONE uses the current time zone
rules.

Backpatch-through: 9.3
2018-09-04 22:34:07 -04:00
Tom Lane 0b5054369f Doc: fix oversights in "Client/Server Character Set Conversions" table.
This table claimed that JOHAB could be used as a server encoding, which
was true originally but hasn't been true since 8.3.  It also lacked
entries for EUC_JIS_2004 and SHIFT_JIS_2004.

JOHAB problem noted by Lars Kanis, the others by me.

Discussion: https://postgr.es/m/c0f514a1-b7a9-b9ea-1c02-c34aead56c06@greiz-reinsdorf.de
2018-09-01 16:02:47 -04:00
Bruce Momjian ebc0d6be1d doc: add doc link for 'applicable_roles'
Reported-by: Ashutosh Sharma

Discussion: https://postgr.es/m/CAE9k0PnhnL6MNDLuvkk8USzOa_DpzDzFQPAM_uaGuXbh9HMKYw@mail.gmail.com

Author: Ashutosh Sharma

Backpatch-through: 9.3
2018-08-25 13:01:24 -04:00
Bruce Momjian 96e578b6c8 docs: clarify plpython SD and GD dictionary behavior
Reported-by: Adam Bielański

Discussion: https://postgr.es/m/153484305538.1370.7605856225879294548@wrigleys.postgresql.org

Backpatch-through: 9.3
2018-08-25 11:52:29 -04:00
Michael Paquier b6c994af1f Mention ownership requirements for REFRESH MATERIALIZED VIEW in docs
Author: Dian Fay
Discussion: https://postgr.es/m/745abbd2-a1a0-ead8-2cb2-768c16747d97@gmail.com
Backpatch-through: 9.3
2018-08-17 11:33:02 +09:00
Bruce Momjian 57b0e0c0bb docs: Only first instance of a PREPARE parameter sets data type
If the first reference to $1 is "($1 = col) or ($1 is null)", the data
type can be determined, but not for "($1 is null) or ($1 = col)".  This
change documents this.

Reported-by: Morgan Owens

Discussion: https://postgr.es/m/153233728858.1404.15268121695358514937@wrigleys.postgresql.org

Backpatch-through: 9.3
2018-08-09 10:13:15 -04:00
Tom Lane e0fb7a2ce3 Stamp 9.3.24. 2018-08-06 16:13:40 -04:00
Tom Lane ebeb8d5371 Last-minute updates for release notes.
Security: CVE-2018-10915, CVE-2018-10925
2018-08-06 13:13:41 -04:00
Tom Lane c1b34c8089 Release notes for 10.5, 9.6.10, 9.5.14, 9.4.19, 9.3.24. 2018-08-05 16:38:43 -04:00
Tom Lane 716f645d12 Doc: fix incorrectly stated argument list for pgcrypto's hmac() function.
The bytea variant takes (bytea, bytea, text).
Per unsigned report.

Discussion: https://postgr.es/m/153344327294.1404.654155870612982042@wrigleys.postgresql.org
2018-08-05 13:04:36 -04:00
Noah Misch c055099448 Document security implications of qualified names.
Commit 5770172cb0 documented secure schema
usage, and that advice suffices for using unqualified names securely.
Document, in typeconv-func primarily, the additional issues that arise
with qualified names.  Back-patch to 9.3 (all supported versions).

Reviewed by Jonathan S. Katz.

Discussion: https://postgr.es/m/20180721012446.GA1840594@rfd.leadboat.com
2018-07-28 20:08:40 -07:00
Tom Lane cbbe75fe67 Fix crash in contrib/ltree's lca() function for empty input array.
lca_inner() wasn't prepared for the possibility of getting no inputs.
Fix that, and make some cosmetic improvements to the code while at it.

Also, I thought the documentation of this function as returning the
"longest common prefix" of the paths was entirely misleading; it really
returns a path one shorter than the longest common prefix, for the typical
definition of "prefix".  Don't use that term in the docs, and adjust the
examples to clarify what really happens.

This has been broken since its beginning, so back-patch to all supported
branches.

Per report from Hailong Li.  Thanks to Pierre Ducroquet for diagnosing
and for the initial patch, though I whacked it around some and added
test cases.

Discussion: https://postgr.es/m/5b0d8e4f-f2a3-1305-d612-e00e35a7be66@qunar.com
2018-07-13 18:45:30 -04:00
Bruce Momjian a3445ccb77 docs: Remove "New" description of the libpqxx interface
Backpatch-through: 9.3
2018-07-13 11:16:55 -04:00
Tom Lane 2e7a25c1dc Doc: minor improvement in pl/pgsql FETCH/MOVE documentation.
Explain that you can use any integer expression for the "count" in
pl/pgsql's versions of FETCH/MOVE, unlike the SQL versions which only
allow a constant.

Remove the duplicate version of this para under MOVE.  I don't see
a good reason to maintain two identical paras when we just said that
MOVE works exactly like FETCH.

Per Pavel Stehule, though I didn't use his text.

Discussion: https://postgr.es/m/CAFj8pRAcvSXcNdUGx43bOK1e3NNPbQny7neoTLN42af+8MYWEA@mail.gmail.com
2018-07-12 12:28:43 -04:00
Peter Eisentraut 7fbbbe1efb Fix libpq example programs
When these programs call pg_catalog.set_config, they need to check for
PGRES_TUPLES_OK instead of PGRES_COMMAND_OK.  Fix for
5770172cb0.

Reported-by: Ideriha, Takeshi <ideriha.takeshi@jp.fujitsu.com>
2018-07-01 14:09:27 +02:00
Michael Paquier 6acb4e89fe Replace search.cpan.org with metacpan.org
search.cpan.org has been EOL'd, with metacpan.org being the official
replacement to which URLs now redirect.  Update links to match the new
URL. Also update links to CPAN to use https as it will redirect from
http.

Author: Daniel Gustafsson
Discussion: https://postgr.es/m/B74C0219-6BA9-46E1-A524-5B9E8CD3BDB3@yesql.se
2018-06-29 22:19:26 +09:00
Fujii Masao 833397e73e Fix documentation bug related to backup history file.
The backup history file has been no longer necessary for recovery
since the version 9.0. It's now basically just for informational purpose.
But previously the documentations still described that a recovery
requests the backup history file to proceed. The commit fixes this
documentation bug.

Back-patch to all supported versions.

Author: Yugo Nagata
Reviewed-by: Kyotaro Horiguchi
Discussion: https://postgr.es/m/20180626174752.0ce505e3.nagata@sraoss.co.jp
2018-06-27 00:51:57 +09:00
Thomas Munro edabd8f5a4 Add PGTYPESchar_free() to avoid cross-module problems on Windows.
On Windows, it is sometimes important for corresponding malloc() and
free() calls to be made from the same DLL, since some build options can
result in multiple allocators being active at the same time.  For that
reason we already provided PQfreemem().  This commit adds a similar
function for freeing string results allocated by the pgtypes library.

Author: Takayuki Tsunakawa
Reviewed-by: Kyotaro Horiguchi
Discussion: https://postgr.es/m/0A3221C70F24FB45833433255569204D1F8AD5D6%40G01JPEXMBYT05
2018-06-26 23:37:49 +12:00
Bruce Momjian 0a140ab32f doc: adjust order of NUMERIC arguments to match syntax
Specifically, mention precision before scale

Reported-by: claytonjsalem@gmail.com

Discussion: https://postgr.es/m/152967566691.1268.1062965601465200209@wrigleys.postgresql.org

Backpatch-through: 9.3
2018-06-24 18:07:00 -04:00
Bruce Momjian 1d4b73cddd doc: show how interval's 3 unit buckets behave using EXTRACT()
This clarifies when justify_days() and justify_hours() are useful.
Paragraph moved too.

Reported-by: vodevsh@gmail.com

Discussion: https://postgr.es/m/152698651482.26744.15456677499485530703@wrigleys.postgresql.org

Backpatch-through: 9.3
2018-06-23 23:32:41 -04:00
Magnus Hagander 048abf83ed Fix typo
Reported using the website comment form
2018-06-20 16:08:06 +02:00
Michael Paquier 50dfe3a44c Fix grammar in REVOKE documentation
Reported-by: Erwin Brandstetter
2018-06-10 22:50:51 +09:00
Bruce Momjian a7d84ef5d7 doc: mark 'replaceable' parameter for backup program listing
Reported-by: Liudmila Mantrova

Discussion: https://postgr.es/m/f3e2c0f5-5266-d626-58d7-b77e1b29d870@postgrespro.ru

Author: Liudmila Mantrova

Backpatch-through: 9.3
2018-05-28 14:19:45 -04:00
Bruce Momjian 7f5f74686d doc: adjust DECLARE docs to mention FOR UPDATE behavior
Reported-by: Peter Eisentraut

Discussion: https://postgr.es/m/8dc63ba7-dc56-fc7c-fc16-4fae03e3bfe6@2ndquadrant.com

Author: Peter Eisentraut, Tom Lane, me

Backpatch-through: 9.3
2018-05-28 13:16:02 -04:00
Magnus Hagander 60242ebcfe Remove incorrect statement about IPC configuration on OpenBSD
kern.ipc.shm_use_phys is not a sysctl on OpenBSD, and SEMMAP is not
a kernel configuration option. These were probably copy pasteos from
when the documentation had a single paragraph for *BSD.

Author: Daniel Gustafsson <daniel@yesql.se>
2018-05-25 14:01:22 +02:00
Andrew Gierth 89b09db01b Fix SQL:2008 FETCH FIRST syntax to allow parameters.
OFFSET <x> ROWS FETCH FIRST <y> ROWS ONLY syntax is supposed to accept
<simple value specification>, which includes parameters as well as
literals. When this syntax was added all those years ago, it was done
inconsistently, with <x> and <y> being different subsets of the
standard syntax.

Rectify that by making <x> and <y> accept the same thing, and allowing
either a (signed) numeric literal or a c_expr there, which allows for
parameters, variables, and parenthesized arbitrary expressions.

Per bug #15200 from Lukas Eder.

Backpatch all the way, since this has been broken from the start.

Discussion: https://postgr.es/m/877enz476l.fsf@news-spur.riddles.org.uk
Discussion: http://postgr.es/m/152647780335.27204.16895288237122418685@wrigleys.postgresql.org
2018-05-21 17:32:34 +01:00
Tom Lane 0aa97b86f9 printf("%lf") is not portable, so omit the "l".
The "l" (ell) width spec means something in the corresponding scanf usage,
but not here.  While modern POSIX says that applying "l" to "f" and other
floating format specs is a no-op, SUSv2 says it's undefined.  Buildfarm
experience says that some old compilers emit warnings about it, and at
least one old stdio implementation (mingw's "ANSI" option) actually
produces wrong answers and/or crashes.

Discussion: https://postgr.es/m/21670.1526769114@sss.pgh.pa.us
Discussion: https://postgr.es/m/c085e1da-0d64-1c15-242d-c921f32e0d5c@dunslane.net
2018-05-20 11:40:55 -04:00
Tom Lane ec8e7d60ba Stamp 9.3.23. 2018-05-07 16:59:47 -04:00
Tom Lane 035524b118 Last-minute updates for release notes.
The set of functions that need parallel-safety adjustments isn't the
same in 9.6 as 10, so I shouldn't have blindly back-patched that list.
Adjust as needed.  Also, provide examples of the commands to issue.
2018-05-07 13:13:49 -04:00
Tom Lane cfdd753bd1 Release notes for 10.4, 9.6.9, 9.5.13, 9.4.18, 9.3.23. 2018-05-06 15:30:45 -04:00
Bruce Momjian 1c66ee81fe docs: remove "III" version text from pgAdmin link
Reported-by: vodevsh@gmail.com

Discussion: https://postgr.es/m/152404286919.19366.7988650271505173666@wrigleys.postgresql.org

Backpatch-through: 9.3
2018-04-26 11:10:43 -04:00
Tom Lane bd213fd66a Doc: clarify explanation of pg_dump usage.
This section confusingly used both "infile" and "outfile" to refer
to the same file, i.e. the textual output of pg_dump.  Use "dumpfile"
for both cases, per suggestion from Jonathan Katz.

Discussion: https://postgr.es/m/152311295239.31235.6487236091906987117@wrigleys.postgresql.org
2018-04-08 16:35:43 -04:00
Bruce Momjian d2c9737bc8 doc: remove mention of the DMOZ catalog in ltree docs
Discussion: https://postgr.es/m/CAF4Au4xYem_W3KOuxcKct7=G4j8Z3uO9j3DUKTFJqUsfp_9pQg@mail.gmail.com

Author: Oleg Bartunov

Backpatch-through: 9.3
2018-04-05 15:55:41 -04:00
Bruce Momjian 4b9b3f5c43 docs: update ltree URL for the DMOZ catalog
Reported-by: bbrincat@gmail.com

Discussion: https://postgr.es/m/152283596377.1441.11672249301622760943@wrigleys.postgresql.org

Author: Oleg Bartunov

Backpatch-through: 9.3
2018-04-04 15:06:21 -04:00
Bruce Momjian 6e9c8d5a2f doc: document "IS NOT DOCUMENT"
Reported-by: scott.ure@caseware.com

Discussion: https://postgr.es/m/152056505045.4963.16783351661813640274@wrigleys.postgresql.org

Author: Euler Taveira

Backpatch-through: 9.3
2018-04-02 16:41:46 -04:00
Bruce Momjian 10fbb0eabb docs: add parameter with brackets around varbit()
Reported-by: scott.ure@caseware.com

Discussion: https://postgr.es/m/152074343671.1853.18284519607571497106@wrigleys.postgresql.org

Author: Euler Taveira

Backpatch-through: 9.3
2018-03-30 13:34:12 -04:00