pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: More message style fixes
7+ messages / 4 participants
[nested] [flat]

Commits from this thread:
  2019-05-17 6ba500cae6  Fix regression test outputs
* pgsql: More message style fixes
@ 2019-05-16 23:15 Alvaro Herrera <alvherre@alvh.no-ip.org>
  2019-05-16 23:20 ` Re: pgsql: More message style fixes Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 7+ messages in thread

From: Alvaro Herrera @ 2019-05-16 23:15 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

More message style fixes

Discussion: https://postgr.es/m/20190515183005.GA26486@alvherre.pgsql

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/75445c1515fffa581585f1b72e5b5314c1c395ce

Modified Files
--------------
src/backend/commands/copy.c             |  6 ++---
src/backend/commands/publicationcmds.c  |  2 +-
src/backend/commands/subscriptioncmds.c | 40 +++++++++++++++++++++------------
src/backend/commands/tablecmds.c        |  8 +++----
src/backend/parser/analyze.c            |  2 +-
src/backend/postmaster/postmaster.c     |  7 +++---
src/backend/replication/walsender.c     | 25 ++++++++++++---------
src/backend/utils/adt/jsonpath.c        |  3 ++-
src/backend/utils/adt/jsonpath_exec.c   |  2 +-
src/backend/utils/adt/jsonpath_scan.l   | 10 ++++-----
src/backend/utils/adt/pg_locale.c       | 10 +++++----
src/backend/utils/adt/regexp.c          | 14 ++++++++----
12 files changed, 78 insertions(+), 51 deletions(-)



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: pgsql: More message style fixes
  2019-05-16 23:15 pgsql: More message style fixes Alvaro Herrera <alvherre@alvh.no-ip.org>
@ 2019-05-16 23:20 ` Tom Lane <tgl@sss.pgh.pa.us>
  2019-05-17 00:15   ` Re: pgsql: More message style fixes Michael Paquier <michael@paquier.xyz>
  0 siblings, 1 reply; 7+ messages in thread

From: Tom Lane @ 2019-05-16 23:20 UTC (permalink / raw)
  To: Alvaro Herrera <alvherre@alvh.no-ip.org>; +Cc: pgsql-committers@lists.postgresql.org

Alvaro Herrera <alvherre@alvh.no-ip.org> writes:
> More message style fixes

The buildfarm thinks you forgot something.

			regards, tom lane





^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: pgsql: More message style fixes
  2019-05-16 23:15 pgsql: More message style fixes Alvaro Herrera <alvherre@alvh.no-ip.org>
  2019-05-16 23:20 ` Re: pgsql: More message style fixes Tom Lane <tgl@sss.pgh.pa.us>
@ 2019-05-17 00:15   ` Michael Paquier <michael@paquier.xyz>
  2019-05-17 00:22     ` Re: pgsql: More message style fixes Tom Lane <tgl@sss.pgh.pa.us>
  2019-05-17 02:29     ` Re: pgsql: More message style fixes Alvaro Herrera <alvherre@2ndquadrant.com>
  0 siblings, 2 replies; 7+ messages in thread

From: Michael Paquier @ 2019-05-17 00:15 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: Alvaro Herrera <alvherre@alvh.no-ip.org>; pgsql-committers@lists.postgresql.org

On Thu, May 16, 2019 at 07:20:38PM -0400, Tom Lane wrote:
> Alvaro Herrera <alvherre@alvh.no-ip.org> writes:
>> More message style fixes
> 
> The buildfarm thinks you forgot something.

One contrib module is impacted, citext, because it uses regexes and it
has multiple expected outputs.  The attached brings back my build to
green.  Thoughts?

I got a bit annoyed when testing this morning, so I don't mind fixing
it myself.  And I still have some hours left today to look at extra
red animals if any.
--
Michael

Attachments:

fix-test-output.patch (text/x-diff, 10.4K) download diff --git a/contrib/citext/expected/citext.out b/contrib/citext/expected/citext.out index 20890db859..94aba67cdb 100644 --- a/contrib/citext/expected/citext.out +++ b/contrib/citext/expected/citext.out @@ -1841,7 +1841,7 @@ SELECT regexp_match('foobarbequebaz'::citext, '(BAR)(BEQUE)'::citext, 'c'::citex -- g is not allowed SELECT regexp_match('foobarbequebazmorebarbequetoo'::citext, '(BAR)(BEQUE)'::citext, 'g') AS "error"; -ERROR: regexp_match does not support the global option +ERROR: regexp_match() does not support the "global" option HINT: Use the regexp_matches function instead. CONTEXT: SQL function "regexp_match" statement 1 SELECT regexp_matches('foobarbequebaz'::citext, '(bar)(beque)') = ARRAY[ 'bar', 'beque' ] AS t; diff --git a/contrib/citext/expected/citext_1.out b/contrib/citext/expected/citext_1.out index 755baad8e2..187d3b5d2c 100644 --- a/contrib/citext/expected/citext_1.out +++ b/contrib/citext/expected/citext_1.out @@ -1841,7 +1841,7 @@ SELECT regexp_match('foobarbequebaz'::citext, '(BAR)(BEQUE)'::citext, 'c'::citex -- g is not allowed SELECT regexp_match('foobarbequebazmorebarbequetoo'::citext, '(BAR)(BEQUE)'::citext, 'g') AS "error"; -ERROR: regexp_match does not support the global option +ERROR: regexp_match() does not support the "global" option HINT: Use the regexp_matches function instead. CONTEXT: SQL function "regexp_match" statement 1 SELECT regexp_matches('foobarbequebaz'::citext, '(bar)(beque)') = ARRAY[ 'bar', 'beque' ] AS t; diff --git a/src/test/regress/expected/copy2.out b/src/test/regress/expected/copy2.out index 75d4119eaa..c53ed3ebf5 100644 --- a/src/test/regress/expected/copy2.out +++ b/src/test/regress/expected/copy2.out @@ -360,12 +360,12 @@ SELECT * FROM vistest; COMMIT; TRUNCATE vistest; COPY vistest FROM stdin CSV FREEZE; -ERROR: cannot perform FREEZE because the table was not created or truncated in the current subtransaction +ERROR: cannot perform COPY FREEZE because the table was not created or truncated in the current subtransaction BEGIN; TRUNCATE vistest; SAVEPOINT s1; COPY vistest FROM stdin CSV FREEZE; -ERROR: cannot perform FREEZE because the table was not created or truncated in the current subtransaction +ERROR: cannot perform COPY FREEZE because the table was not created or truncated in the current subtransaction COMMIT; BEGIN; INSERT INTO vistest VALUES ('z'); @@ -373,7 +373,7 @@ SAVEPOINT s1; TRUNCATE vistest; ROLLBACK TO SAVEPOINT s1; COPY vistest FROM stdin CSV FREEZE; -ERROR: cannot perform FREEZE because the table was not created or truncated in the current subtransaction +ERROR: cannot perform COPY FREEZE because the table was not created or truncated in the current subtransaction COMMIT; CREATE FUNCTION truncate_in_subxact() RETURNS VOID AS $$ diff --git a/src/test/regress/expected/create_table.out b/src/test/regress/expected/create_table.out index ad0cb32678..204441e759 100644 --- a/src/test/regress/expected/create_table.out +++ b/src/test/regress/expected/create_table.out @@ -418,7 +418,7 @@ ERROR: partition key expressions cannot contain whole-row references CREATE TABLE partitioned ( a point ) PARTITION BY LIST (a); -ERROR: data type point has no default btree operator class +ERROR: data type point has no default operator class for access method "btree" HINT: You must specify a btree operator class or define a default btree operator class for the data type. CREATE TABLE partitioned ( a point @@ -427,7 +427,7 @@ ERROR: operator class "point_ops" does not exist for access method "btree" CREATE TABLE partitioned ( a point ) PARTITION BY RANGE (a); -ERROR: data type point has no default btree operator class +ERROR: data type point has no default operator class for access method "btree" HINT: You must specify a btree operator class or define a default btree operator class for the data type. CREATE TABLE partitioned ( a point diff --git a/src/test/regress/expected/jsonb_jsonpath.out b/src/test/regress/expected/jsonb_jsonpath.out index 2b63da3f24..b486fb602a 100644 --- a/src/test/regress/expected/jsonb_jsonpath.out +++ b/src/test/regress/expected/jsonb_jsonpath.out @@ -486,7 +486,7 @@ select * from jsonb_path_query('{"a": 10}', '$'); (1 row) select * from jsonb_path_query('{"a": 10}', '$ ? (@.a < $value)'); -ERROR: cannot find jsonpath variable "value" +ERROR: could not find jsonpath variable "value" select * from jsonb_path_query('{"a": 10}', '$ ? (@.a < $value)', '1'); ERROR: "vars" argument is not an object DETAIL: Jsonpath parameters should be encoded as key-value pairs of "vars" object. diff --git a/src/test/regress/expected/jsonpath.out b/src/test/regress/expected/jsonpath.out index c7bd26887c..0f9cd17e2e 100644 --- a/src/test/regress/expected/jsonpath.out +++ b/src/test/regress/expected/jsonpath.out @@ -1,6 +1,6 @@ --jsonpath io select ''::jsonpath; -ERROR: invalid input syntax for jsonpath: "" +ERROR: invalid input syntax for type jsonpath: "" LINE 1: select ''::jsonpath; ^ select '$'::jsonpath; diff --git a/src/test/regress/expected/publication.out b/src/test/regress/expected/publication.out index afbbdd543d..0e5e8f2b92 100644 --- a/src/test/regress/expected/publication.out +++ b/src/test/regress/expected/publication.out @@ -17,7 +17,7 @@ CREATE PUBLICATION testpib_ins_trunct WITH (publish = insert); ALTER PUBLICATION testpub_default SET (publish = update); -- error cases CREATE PUBLICATION testpub_xxx WITH (foo); -ERROR: unrecognized publication parameter: foo +ERROR: unrecognized publication parameter: "foo" CREATE PUBLICATION testpub_xxx WITH (publish = 'cluster, vacuum'); ERROR: unrecognized "publish" value: "cluster" \dRp diff --git a/src/test/regress/expected/regex.out b/src/test/regress/expected/regex.out index f372003091..0923ad9b5b 100644 --- a/src/test/regress/expected/regex.out +++ b/src/test/regress/expected/regex.out @@ -116,7 +116,7 @@ select regexp_match('abc', '(B)(c)', 'i'); (1 row) select regexp_match('abc', 'Bd', 'ig'); -- error -ERROR: regexp_match does not support the global option +ERROR: regexp_match() does not support the "global" option HINT: Use the regexp_matches function instead. -- Test lookahead constraints select regexp_matches('ab', 'a(?=b)b*'); diff --git a/src/test/regress/expected/strings.out b/src/test/regress/expected/strings.out index 24570bed16..486c00b3b3 100644 --- a/src/test/regress/expected/strings.out +++ b/src/test/regress/expected/strings.out @@ -437,7 +437,7 @@ SELECT regexp_replace('AAA aaa', 'A+', 'Z', 'gi'); -- invalid regexp option SELECT regexp_replace('AAA aaa', 'A+', 'Z', 'z'); -ERROR: invalid regexp option: "z" +ERROR: invalid regular expression option: "z" -- set so we can tell NULL from empty string \pset null '\\N' -- return all matches from regexp @@ -549,7 +549,7 @@ SELECT regexp_matches(chr(10) || '1' || chr(10) || '2' || chr(10) || '3' || chr( -- give me errors SELECT regexp_matches('foobarbequebaz', $re$(bar)(beque)$re$, 'gz'); -ERROR: invalid regexp option: "z" +ERROR: invalid regular expression option: "z" SELECT regexp_matches('foobarbequebaz', $re$(barbeque$re$); ERROR: invalid regular expression: parentheses () not balanced SELECT regexp_matches('foobarbequebaz', $re$(bar)(beque){2,1}$re$); @@ -743,14 +743,14 @@ SELECT regexp_split_to_array('1',''); -- errors SELECT foo, length(foo) FROM regexp_split_to_table('thE QUick bROWn FOx jUMPs ovEr The lazy dOG', 'e', 'zippy') AS foo; -ERROR: invalid regexp option: "z" +ERROR: invalid regular expression option: "z" SELECT regexp_split_to_array('thE QUick bROWn FOx jUMPs ovEr The lazy dOG', 'e', 'iz'); -ERROR: invalid regexp option: "z" +ERROR: invalid regular expression option: "z" -- global option meaningless for regexp_split SELECT foo, length(foo) FROM regexp_split_to_table('thE QUick bROWn FOx jUMPs ovEr The lazy dOG', 'e', 'g') AS foo; -ERROR: regexp_split_to_table does not support the global option +ERROR: regexp_split_to_table() does not support the "global" option SELECT regexp_split_to_array('thE QUick bROWn FOx jUMPs ovEr The lazy dOG', 'e', 'g'); -ERROR: regexp_split_to_array does not support the global option +ERROR: regexp_split_to_array() does not support the "global" option -- change NULL-display back \pset null '' -- E021-11 position expression diff --git a/src/test/regress/expected/subscription.out b/src/test/regress/expected/subscription.out index 4fcbf7efe9..fae5c079c0 100644 --- a/src/test/regress/expected/subscription.out +++ b/src/test/regress/expected/subscription.out @@ -53,7 +53,7 @@ ERROR: connect = false and enabled = true are mutually exclusive options CREATE SUBSCRIPTION testsub2 CONNECTION 'dbname=doesnotexist' PUBLICATION testpub WITH (connect = false, create_slot = true); ERROR: connect = false and create_slot = true are mutually exclusive options CREATE SUBSCRIPTION testsub2 CONNECTION 'dbname=doesnotexist' PUBLICATION testpub WITH (slot_name = NONE, enabled = true); -ERROR: slot_name = NONE and enabled = true are mutually exclusive options +ERROR: slot_name = NONE and enable = true are mutually exclusive options CREATE SUBSCRIPTION testsub2 CONNECTION 'dbname=doesnotexist' PUBLICATION testpub WITH (slot_name = NONE, create_slot = true); ERROR: slot_name = NONE and create_slot = true are mutually exclusive options CREATE SUBSCRIPTION testsub2 CONNECTION 'dbname=doesnotexist' PUBLICATION testpub WITH (slot_name = NONE); @@ -89,7 +89,7 @@ ALTER SUBSCRIPTION testsub SET (slot_name = 'newname'); ALTER SUBSCRIPTION doesnotexist CONNECTION 'dbname=doesnotexist2'; ERROR: subscription "doesnotexist" does not exist ALTER SUBSCRIPTION testsub SET (create_slot = false); -ERROR: unrecognized subscription parameter: create_slot +ERROR: unrecognized subscription parameter: "create_slot" \dRs+ List of subscriptions Name | Owner | Enabled | Publication | Synchronous commit | Conninfo diff --git a/src/test/regress/output/copy.source b/src/test/regress/output/copy.source index b16247230a..cf716aecca 100644 --- a/src/test/regress/output/copy.source +++ b/src/test/regress/output/copy.source @@ -117,7 +117,7 @@ copy parted_copytest from '@abs_builddir@/results/parted_copytest.csv'; begin; truncate parted_copytest; copy parted_copytest from '@abs_builddir@/results/parted_copytest.csv' (freeze); -ERROR: cannot perform FREEZE on a partitioned table +ERROR: cannot perform COPY FREEZE on a partitioned table rollback; select tableoid::regclass,count(*),sum(a) from parted_copytest group by tableoid order by tableoid::regclass::name;
signature.asc (application/pgp-signature, 832B) download ^ permalink raw reply [nested|flat] 7+ messages in thread

* Re: pgsql: More message style fixes
  2019-05-16 23:15 pgsql: More message style fixes Alvaro Herrera <alvherre@alvh.no-ip.org>
  2019-05-16 23:20 ` Re: pgsql: More message style fixes Tom Lane <tgl@sss.pgh.pa.us>
  2019-05-17 00:15   ` Re: pgsql: More message style fixes Michael Paquier <michael@paquier.xyz>
@ 2019-05-17 00:22     ` Tom Lane <tgl@sss.pgh.pa.us>
  2019-05-17 00:47       ` Re: pgsql: More message style fixes Michael Paquier <michael@paquier.xyz>
  1 sibling, 1 reply; 7+ messages in thread

From: Tom Lane @ 2019-05-17 00:22 UTC (permalink / raw)
  To: Michael Paquier <michael@paquier.xyz>; +Cc: Alvaro Herrera <alvherre@alvh.no-ip.org>; pgsql-committers@lists.postgresql.org

Michael Paquier <michael@paquier.xyz> writes:
> On Thu, May 16, 2019 at 07:20:38PM -0400, Tom Lane wrote:
>> The buildfarm thinks you forgot something.

> One contrib module is impacted, citext, because it uses regexes and it
> has multiple expected outputs.  The attached brings back my build to
> green.  Thoughts?

Looks reasonable, but check if any of the other tests have alternative
expected-files that you need to fix too.

			regards, tom lane





^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: pgsql: More message style fixes
  2019-05-16 23:15 pgsql: More message style fixes Alvaro Herrera <alvherre@alvh.no-ip.org>
  2019-05-16 23:20 ` Re: pgsql: More message style fixes Tom Lane <tgl@sss.pgh.pa.us>
  2019-05-17 00:15   ` Re: pgsql: More message style fixes Michael Paquier <michael@paquier.xyz>
  2019-05-17 00:22     ` Re: pgsql: More message style fixes Tom Lane <tgl@sss.pgh.pa.us>
@ 2019-05-17 00:47       ` Michael Paquier <michael@paquier.xyz>
  0 siblings, 0 replies; 7+ messages in thread

From: Michael Paquier @ 2019-05-17 00:47 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: Alvaro Herrera <alvherre@alvh.no-ip.org>; pgsql-committers@lists.postgresql.org

On Thu, May 16, 2019 at 08:22:25PM -0400, Tom Lane wrote:
> Looks reasonable, but check if any of the other tests have alternative
> expected-files that you need to fix too.

I am not noticing anything else.  And I have checked once before
sending the previous patch, and once again now.  If I have missed one,
well...  Sorry.
--
Michael

Attachments:

  signature.asc (application/pgp-signature, 832B) download

^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: pgsql: More message style fixes
  2019-05-16 23:15 pgsql: More message style fixes Alvaro Herrera <alvherre@alvh.no-ip.org>
  2019-05-16 23:20 ` Re: pgsql: More message style fixes Tom Lane <tgl@sss.pgh.pa.us>
  2019-05-17 00:15   ` Re: pgsql: More message style fixes Michael Paquier <michael@paquier.xyz>
@ 2019-05-17 02:29     ` Alvaro Herrera <alvherre@2ndquadrant.com>
  2019-05-17 03:33       ` Re: pgsql: More message style fixes Michael Paquier <michael@paquier.xyz>
  1 sibling, 1 reply; 7+ messages in thread

From: Alvaro Herrera @ 2019-05-17 02:29 UTC (permalink / raw)
  To: Michael Paquier <michael@paquier.xyz>; +Cc: Tom Lane <tgl@sss.pgh.pa.us>; pgsql-committers@lists.postgresql.org

On 2019-May-17, Michael Paquier wrote:

> On Thu, May 16, 2019 at 07:20:38PM -0400, Tom Lane wrote:
> > Alvaro Herrera <alvherre@alvh.no-ip.org> writes:
> >> More message style fixes
> > 
> > The buildfarm thinks you forgot something.
> 
> One contrib module is impacted, citext, because it uses regexes and it
> has multiple expected outputs.  The attached brings back my build to
> green.  Thoughts?

Argh.  Apologies, sorry for fixing so quickly.

-- 
Álvaro Herrera                https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services





^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: pgsql: More message style fixes
  2019-05-16 23:15 pgsql: More message style fixes Alvaro Herrera <alvherre@alvh.no-ip.org>
  2019-05-16 23:20 ` Re: pgsql: More message style fixes Tom Lane <tgl@sss.pgh.pa.us>
  2019-05-17 00:15   ` Re: pgsql: More message style fixes Michael Paquier <michael@paquier.xyz>
  2019-05-17 02:29     ` Re: pgsql: More message style fixes Alvaro Herrera <alvherre@2ndquadrant.com>
@ 2019-05-17 03:33       ` Michael Paquier <michael@paquier.xyz>
  0 siblings, 0 replies; 7+ messages in thread

From: Michael Paquier @ 2019-05-17 03:33 UTC (permalink / raw)
  To: Alvaro Herrera <alvherre@2ndquadrant.com>; +Cc: Tom Lane <tgl@sss.pgh.pa.us>; pgsql-committers@lists.postgresql.org

On Thu, May 16, 2019 at 10:29:16PM -0400, Alvaro Herrera wrote:
> Argh.  Apologies, sorry for fixing so quickly.

No problem.  The buildfarm does not complain anymore after the patch,
so it looks that we are good.
--
Michael

Attachments:

  signature.asc (application/pgp-signature, 832B) download

^ permalink  raw  reply  [nested|flat] 7+ messages in thread


end of thread, other threads:[~2019-05-17 03:33 UTC | newest]

Thread overview: 7+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2019-05-16 23:15 pgsql: More message style fixes Alvaro Herrera <alvherre@alvh.no-ip.org>
2019-05-16 23:20 ` Tom Lane <tgl@sss.pgh.pa.us>
2019-05-17 00:15   ` Michael Paquier <michael@paquier.xyz>
2019-05-17 00:22     ` Tom Lane <tgl@sss.pgh.pa.us>
2019-05-17 00:47       ` Michael Paquier <michael@paquier.xyz>
2019-05-17 02:29     ` Alvaro Herrera <alvherre@2ndquadrant.com>
2019-05-17 03:33       ` Michael Paquier <michael@paquier.xyz>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox