pgsql: Doc: fix incorrect example of collecting arguments with fmgr mac

2018-12-19 Thread Tom Lane
Doc: fix incorrect example of collecting arguments with fmgr macros. Thinko in commit f66912b0a. Back-patch to v10, as that was. Discussion: https://postgr.es/m/[email protected] Branch -- REL_10_STABLE Details --- https://git.postgresql.o

pgsql: Doc: fix incorrect example of collecting arguments with fmgr mac

2018-12-19 Thread Tom Lane
Doc: fix incorrect example of collecting arguments with fmgr macros. Thinko in commit f66912b0a. Back-patch to v10, as that was. Discussion: https://postgr.es/m/[email protected] Branch -- REL_11_STABLE Details --- https://git.postgresql.o

pgsql: Doc: fix incorrect example of collecting arguments with fmgr mac

2018-12-19 Thread Tom Lane
Doc: fix incorrect example of collecting arguments with fmgr macros. Thinko in commit f66912b0a. Back-patch to v10, as that was. Discussion: https://postgr.es/m/[email protected] Branch -- master Details --- https://git.postgresql.org/pg/c

pgsql: Small improvements for allocation logic in ginHeapTupleFastColle

2018-12-19 Thread Tom Lane
Small improvements for allocation logic in ginHeapTupleFastCollect(). Avoid repetitive calls to repalloc() when the required size of the collector array grows more than 2x in one call. Also ensure that the array size is a power of 2 (since palloc will probably consume a power of 2 anyway) and doe

pgsql: Remove function names from error messages

2018-12-19 Thread Alvaro Herrera
Remove function names from error messages They are not necessary, and having them there gives useless work for translators. Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/68f6f2b7395fe3e403034bcd97a1fcfbcc68ae10 Modified Files -- src/backend/access/tra

pgsql: Make type "name" collation-aware.

2018-12-19 Thread Tom Lane
Make type "name" collation-aware. The "name" comparison operators now all support collations, making them functionally equivalent to "text" comparisons, except for the different physical representation of the datatype. They do, in fact, mostly share the varstr_cmp and varstr_sortsupport infrastru

pgsql: Add text-vs-name cross-type operators, and unify name_ops with t

2018-12-19 Thread Tom Lane
Add text-vs-name cross-type operators, and unify name_ops with text_ops. Now that name comparison has effectively the same behavior as text comparison, we might as well merge the name_ops opfamily into text_ops, allowing cross-type comparisons to be processed without forcing a datatype coercion fi

Re: pgsql: Remove function names from error messages

2018-12-19 Thread Michael Paquier
On Wed, Dec 19, 2018 at 05:53:48PM +, Alvaro Herrera wrote: > Remove function names from error messages > > They are not necessary, and having them there gives useless work for > translators. I am spotting a couple of extra ones for functions: src/backend/access/transam/xlog.c: (errmsg("pg_st

Re: pgsql: Remove function names from error messages

2018-12-19 Thread Tom Lane
Michael Paquier writes: > On Wed, Dec 19, 2018 at 05:53:48PM +, Alvaro Herrera wrote: >> Remove function names from error messages > I am spotting a couple of extra ones for functions: > src/backend/access/transam/xlog.c: > (errmsg("pg_stop_backup cleanup done, waiting for required WAL segmen

Re: pgsql: Remove function names from error messages

2018-12-19 Thread Michael Paquier
On Wed, Dec 19, 2018 at 07:42:31PM -0500, Tom Lane wrote: > Those are at least reporting SQL function names that the user will > recognize ... still, we don't normally localize error messages > by the reporting function name, so I tend to agree that these are > not following the style guide. What

pgsql: Fix ADD IF NOT EXISTS used in conjunction with ALTER TABLE ONLY

2018-12-19 Thread Greg Stark
Fix ADD IF NOT EXISTS used in conjunction with ALTER TABLE ONLY The flag for IF NOT EXISTS was only being passed down in the normal recursing case. It's been this way since originally added in 9.6 in commit 2cd40adb85 so backpatch back to 9.6. Branch -- REL9_6_STABLE Details --- https://

pgsql: Fix ADD IF NOT EXISTS used in conjunction with ALTER TABLE ONLY

2018-12-19 Thread Greg Stark
Fix ADD IF NOT EXISTS used in conjunction with ALTER TABLE ONLY The flag for IF NOT EXISTS was only being passed down in the normal recursing case. It's been this way since originally added in 9.6 in commit 2cd40adb85 so backpatch back to 9.6. Branch -- REL_11_STABLE Details --- https://

pgsql: Fix ADD IF NOT EXISTS used in conjunction with ALTER TABLE ONLY

2018-12-19 Thread Greg Stark
Fix ADD IF NOT EXISTS used in conjunction with ALTER TABLE ONLY The flag for IF NOT EXISTS was only being passed down in the normal recursing case. It's been this way since originally added in 9.6 in commit 2cd40adb85 so backpatch back to 9.6. Branch -- master Details --- https://git.pos

pgsql: Fix ADD IF NOT EXISTS used in conjunction with ALTER TABLE ONLY

2018-12-19 Thread Greg Stark
Fix ADD IF NOT EXISTS used in conjunction with ALTER TABLE ONLY The flag for IF NOT EXISTS was only being passed down in the normal recursing case. It's been this way since originally added in 9.6 in commit 2cd40adb85 so backpatch back to 9.6. Branch -- REL_10_STABLE Details --- https://

Re: pgsql: Remove function names from error messages

2018-12-19 Thread Tom Lane
Michael Paquier writes: > On Wed, Dec 19, 2018 at 07:42:31PM -0500, Tom Lane wrote: >> Those are at least reporting SQL function names that the user will >> recognize ... still, we don't normally localize error messages >> by the reporting function name, so I tend to agree that these are >> not fo

pgsql: Add more tab completion for CREATE TABLE in psql

2018-12-19 Thread Michael Paquier
Add more tab completion for CREATE TABLE in psql The following completion patterns are added: - CREATE TABLE with '(', OF or PARTITION OF. - CREATE TABLE OF with list of composite types. - CREATE TABLE name (...) with PARTITION OF, WITH, TABLESPACE, ON COMMIT (depending on the presence of a temp

Re: pgsql: Remove function names from error messages

2018-12-19 Thread Michael Paquier
On Wed, Dec 19, 2018 at 11:39:23PM -0500, Tom Lane wrote: > Hm, I guess I shouldn't have used the word "localize". I didn't > mean whether the function name should be translated; what I meant > was that we normally don't mention individual functions at all in > error messages. The messages are su