public inbox for [email protected]  
help / color / mirror / Atom feed
[PATCH v36 3/3] Avoid some calls to RelationGetRelationName
8+ messages / 5 participants
[nested] [flat]

* [PATCH v36 3/3] Avoid some calls to RelationGetRelationName
@ 2020-02-27 01:22  Justin Pryzby <[email protected]>
  0 siblings, 0 replies; 8+ messages in thread

From: Justin Pryzby @ 2020-02-27 01:22 UTC (permalink / raw)

---
 src/backend/access/heap/vacuumlazy.c | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/src/backend/access/heap/vacuumlazy.c b/src/backend/access/heap/vacuumlazy.c
index a996d73e48..36b92f207f 100644
--- a/src/backend/access/heap/vacuumlazy.c
+++ b/src/backend/access/heap/vacuumlazy.c
@@ -643,8 +643,8 @@ heap_vacuum_rel(Relation onerel, VacuumParams *params,
 			}
 			appendStringInfo(&buf, msgfmt,
 							 get_database_name(MyDatabaseId),
-							 get_namespace_name(RelationGetNamespace(onerel)),
-							 RelationGetRelationName(onerel),
+							 vacrelstats->relnamespace,
+							 vacrelstats->relname,
 							 vacrelstats->num_index_scans);
 			appendStringInfo(&buf, _("pages: %u removed, %u remain, %u skipped due to pins, %u skipped frozen\n"),
 							 vacrelstats->pages_removed,
@@ -815,7 +815,7 @@ lazy_scan_heap(Relation onerel, VacuumParams *params, LVRelStats *vacrelstats,
 			if (params->nworkers > 0)
 				ereport(WARNING,
 						(errmsg("disabling parallel option of vacuum on \"%s\" --- cannot vacuum temporary tables in parallel",
-								RelationGetRelationName(onerel))));
+								vacrelstats->relname)));
 		}
 		else
 			lps = begin_parallel_vacuum(RelationGetRelid(onerel), Irel,
@@ -1710,7 +1710,7 @@ lazy_scan_heap(Relation onerel, VacuumParams *params, LVRelStats *vacrelstats,
 	if (vacuumed_pages)
 		ereport(elevel,
 				(errmsg("\"%s\": removed %.0f row versions in %u pages",
-						RelationGetRelationName(onerel),
+						vacrelstats->relname,
 						tups_vacuumed, vacuumed_pages)));
 
 	/*
@@ -1739,7 +1739,7 @@ lazy_scan_heap(Relation onerel, VacuumParams *params, LVRelStats *vacrelstats,
 
 	ereport(elevel,
 			(errmsg("\"%s\": found %.0f removable, %.0f nonremovable row versions in %u out of %u pages",
-					RelationGetRelationName(onerel),
+					vacrelstats->relname,
 					tups_vacuumed, num_tuples,
 					vacrelstats->scanned_pages, nblocks),
 			 errdetail_internal("%s", buf.data)));
@@ -1871,7 +1871,7 @@ lazy_vacuum_heap(Relation onerel, LVRelStats *vacrelstats)
 
 	ereport(elevel,
 			(errmsg("\"%s\": removed %d row versions in %d pages",
-					RelationGetRelationName(onerel),
+					vacrelstats->relname,
 					tupindex, npages),
 			 errdetail_internal("%s", pg_rusage_show(&ru0))));
 
@@ -2416,7 +2416,7 @@ lazy_vacuum_index(Relation indrel, IndexBulkDeleteResult **stats,
 
 	ereport(elevel,
 			(errmsg(msg,
-					RelationGetRelationName(indrel),
+					vacrelstats->indname,
 					dead_tuples->num_tuples),
 			 errdetail_internal("%s", pg_rusage_show(&ru0))));
 
@@ -2581,7 +2581,7 @@ lazy_truncate_heap(Relation onerel, LVRelStats *vacrelstats)
 				vacrelstats->lock_waiter_detected = true;
 				ereport(elevel,
 						(errmsg("\"%s\": stopping truncate due to conflicting lock request",
-								RelationGetRelationName(onerel))));
+								vacrelstats->relname)));
 				return;
 			}
 
@@ -2647,7 +2647,7 @@ lazy_truncate_heap(Relation onerel, LVRelStats *vacrelstats)
 
 		ereport(elevel,
 				(errmsg("\"%s\": truncated %u to %u pages",
-						RelationGetRelationName(onerel),
+						vacrelstats->relname,
 						old_rel_pages, new_rel_pages),
 				 errdetail_internal("%s",
 									pg_rusage_show(&ru0))));
@@ -2712,7 +2712,7 @@ count_nondeletable_pages(Relation onerel, LVRelStats *vacrelstats)
 				{
 					ereport(elevel,
 							(errmsg("\"%s\": suspending truncate due to conflicting lock request",
-									RelationGetRelationName(onerel))));
+									vacrelstats->relname)));
 
 					vacrelstats->lock_waiter_detected = true;
 					return blkno;
-- 
2.17.0


--jKBxcB1XkHIR0Eqt--





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

* [PATCH 1/1] document RelationGetIndexAttrBitmap
@ 2023-07-12 12:19  Alvaro Herrera <[email protected]>
  0 siblings, 0 replies; 8+ messages in thread

From: Alvaro Herrera @ 2023-07-12 12:19 UTC (permalink / raw)

---
 src/backend/utils/cache/relcache.c | 12 +++++++++---
 src/include/utils/relcache.h       |  4 ++++
 2 files changed, 13 insertions(+), 3 deletions(-)

diff --git a/src/backend/utils/cache/relcache.c b/src/backend/utils/cache/relcache.c
index 8a08463c2b7..2f3b580cb0d 100644
--- a/src/backend/utils/cache/relcache.c
+++ b/src/backend/utils/cache/relcache.c
@@ -5149,9 +5149,15 @@ RelationGetIndexPredicate(Relation relation)
  * simple index keys, but attributes used in expressions and partial-index
  * predicates.)
  *
- * Depending on attrKind, a bitmap covering the attnums for all index columns,
- * for all potential foreign key columns, or for all columns in the configured
- * replica identity index is returned.
+ * Depending on attrKind, a bitmap covering attnums for certain columns is
+ * returned:
+ *	INDEX_ATTR_BITMAP_KEY			Columns in non-partial unique indexes not
+ *									in expressions (i.e., usable for FKs)
+ *	INDEX_ATTR_BITMAP_PRIMARY_KEY	Columns in the table's primary key
+ *	INDEX_ATTR_BITMAP_IDENTITY_KEY	Columns in the table's replica identity
+ *									index (empty if FULL)
+ *	INDEX_ATTR_BITMAP_HOT_BLOCKING	Columns that block updates from being HOT
+ *	INDEX_ATTR_BITMAP_SUMMARIZED	Columns included in summarizing indexes
  *
  * Attribute numbers are offset by FirstLowInvalidHeapAttributeNumber so that
  * we can include system attributes (e.g., OID) in the bitmap representation.
diff --git a/src/include/utils/relcache.h b/src/include/utils/relcache.h
index beeb28b83cb..1637ff7152b 100644
--- a/src/include/utils/relcache.h
+++ b/src/include/utils/relcache.h
@@ -54,6 +54,10 @@ extern List *RelationGetIndexPredicate(Relation relation);
 extern Datum *RelationGetIndexRawAttOptions(Relation indexrel);
 extern bytea **RelationGetIndexAttOptions(Relation relation, bool copy);
 
+/*
+ * Possible set types returned by RelationGetIndexAttrBitmap.  Update
+ * the comment atop that function if you modify this enum.
+ */
 typedef enum IndexAttrBitmapKind
 {
 	INDEX_ATTR_BITMAP_KEY,
-- 
2.39.2


--nczdeloqz6xwcyrq--





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

* Re: psql: Could we get "-- " prefixing on the **** QUERY **** outputs? (ECHO_HIDDEN)
@ 2023-07-26 04:22  Nathan Bossart <[email protected]>
  0 siblings, 1 reply; 8+ messages in thread

From: Nathan Bossart @ 2023-07-26 04:22 UTC (permalink / raw)
  To: Alvaro Herrera <[email protected]>; +Cc: Andrey M. Borodin <[email protected]>; Kirk Wolak <[email protected]>; Tom Lane <[email protected]>; Laurenz Albe <[email protected]>; Pavel Stehule <[email protected]>; PostgreSQL Hackers <[email protected]>

I took a look at this patch and changed a couple things:

 * I made a similar adjustment to a few lines that seem to have been
   missed.
 * I removed a couple of asterisks from the adjusted lines in order to
   maintain the existing line lengths.

Barring additional feedback, I think this is ready for commit.

-- 
Nathan Bossart
Amazon Web Services: https://aws.amazon.com


Attachments:

  [text/x-diff] v3-0001-Change-output-of-ECHO_HIDDEN-comments-to-be-SQL-c.patch (3.1K, ../../20230726042222.GA3211130@nathanxps13/2-v3-0001-Change-output-of-ECHO_HIDDEN-comments-to-be-SQL-c.patch)
  download | inline diff:
From 9346a1bbb2fc772527e4b1df82cfdc2dfbc5afb0 Mon Sep 17 00:00:00 2001
From: Kirk Wolak <[email protected]>
Date: Wed, 17 May 2023 16:59:02 -0400
Subject: [PATCH v3 1/1] Change output of ECHO_HIDDEN comments to be SQL
 comments

Simply Add the "/" Required before/after the ********* QUERY ********** (SHOW_HIDDEN on)
so that they are comments and are ignored if you copy and paste a series of them.

Author: Kirk Wolak <[email protected]>
Reviewed By: Pavel Stehule <[email protected]>
Reviewed By: Laurenz Albe <[email protected]>
Thread: https://postgr.es/m/CACLU5mTFJRJYtbvmZ26txGgmXWQo0hkGhH2o3hEquUPmSbGtBw@mail.gmail.com
---
 src/bin/psql/command.c |  8 ++++----
 src/bin/psql/common.c  | 16 ++++++++--------
 2 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/src/bin/psql/command.c b/src/bin/psql/command.c
index 6733f008fd..1300869d79 100644
--- a/src/bin/psql/command.c
+++ b/src/bin/psql/command.c
@@ -5395,16 +5395,16 @@ echo_hidden_command(const char *query)
 {
 	if (pset.echo_hidden != PSQL_ECHO_HIDDEN_OFF)
 	{
-		printf(_("********* QUERY **********\n"
+		printf(_("/******** QUERY *********/\n"
 				 "%s\n"
-				 "**************************\n\n"), query);
+				 "/************************/\n\n"), query);
 		fflush(stdout);
 		if (pset.logfile)
 		{
 			fprintf(pset.logfile,
-					_("********* QUERY **********\n"
+					_("/******** QUERY *********/\n"
 					  "%s\n"
-					  "**************************\n\n"), query);
+					  "/************************/\n\n"), query);
 			fflush(pset.logfile);
 		}
 
diff --git a/src/bin/psql/common.c b/src/bin/psql/common.c
index 5973df2e39..10ad1f2538 100644
--- a/src/bin/psql/common.c
+++ b/src/bin/psql/common.c
@@ -589,16 +589,16 @@ PSQLexec(const char *query)
 
 	if (pset.echo_hidden != PSQL_ECHO_HIDDEN_OFF)
 	{
-		printf(_("********* QUERY **********\n"
+		printf(_("/******** QUERY *********/\n"
 				 "%s\n"
-				 "**************************\n\n"), query);
+				 "/************************/\n\n"), query);
 		fflush(stdout);
 		if (pset.logfile)
 		{
 			fprintf(pset.logfile,
-					_("********* QUERY **********\n"
+					_("/******** QUERY *********/\n"
 					  "%s\n"
-					  "**************************\n\n"), query);
+					  "/************************/\n\n"), query);
 			fflush(pset.logfile);
 		}
 
@@ -1060,9 +1060,9 @@ SendQuery(const char *query)
 		char		buf[3];
 
 		fflush(stderr);
-		printf(_("***(Single step mode: verify command)*******************************************\n"
+		printf(_("/**(Single step mode: verify command)******************************************/\n"
 				 "%s\n"
-				 "***(press return to proceed or enter x and return to cancel)********************\n"),
+				 "/**(press return to proceed or enter x and return to cancel)*******************/\n"),
 			   query);
 		fflush(stdout);
 		if (fgets(buf, sizeof(buf), stdin) != NULL)
@@ -1080,9 +1080,9 @@ SendQuery(const char *query)
 	if (pset.logfile)
 	{
 		fprintf(pset.logfile,
-				_("********* QUERY **********\n"
+				_("/******** QUERY *********/\n"
 				  "%s\n"
-				  "**************************\n\n"), query);
+				  "/************************/\n\n"), query);
 		fflush(pset.logfile);
 	}
 
-- 
2.25.1



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

* Re: psql: Could we get "-- " prefixing on the **** QUERY **** outputs? (ECHO_HIDDEN)
@ 2023-07-26 06:06  Pavel Stehule <[email protected]>
  parent: Nathan Bossart <[email protected]>
  0 siblings, 1 reply; 8+ messages in thread

From: Pavel Stehule @ 2023-07-26 06:06 UTC (permalink / raw)
  To: Nathan Bossart <[email protected]>; +Cc: Alvaro Herrera <[email protected]>; Andrey M. Borodin <[email protected]>; Kirk Wolak <[email protected]>; Tom Lane <[email protected]>; Laurenz Albe <[email protected]>; PostgreSQL Hackers <[email protected]>

st 26. 7. 2023 v 6:22 odesílatel Nathan Bossart <[email protected]>
napsal:

> I took a look at this patch and changed a couple things:
>
>  * I made a similar adjustment to a few lines that seem to have been
>    missed.
>  * I removed a couple of asterisks from the adjusted lines in order to
>    maintain the existing line lengths.
>
> Barring additional feedback, I think this is ready for commit.
>
>
+1

Pavel

-- 
> Nathan Bossart
> Amazon Web Services: https://aws.amazon.com
>


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

* Re: psql: Could we get "-- " prefixing on the **** QUERY **** outputs? (ECHO_HIDDEN)
@ 2023-07-26 21:39  Nathan Bossart <[email protected]>
  parent: Pavel Stehule <[email protected]>
  0 siblings, 2 replies; 8+ messages in thread

From: Nathan Bossart @ 2023-07-26 21:39 UTC (permalink / raw)
  To: Pavel Stehule <[email protected]>; +Cc: Alvaro Herrera <[email protected]>; Andrey M. Borodin <[email protected]>; Kirk Wolak <[email protected]>; Tom Lane <[email protected]>; Laurenz Albe <[email protected]>; PostgreSQL Hackers <[email protected]>

On Wed, Jul 26, 2023 at 08:06:37AM +0200, Pavel Stehule wrote:
> st 26. 7. 2023 v 6:22 odesílatel Nathan Bossart <[email protected]>
> napsal:
>> Barring additional feedback, I think this is ready for commit.
>>
>>
> +1

Great.  I spent some time on the commit message in v4.  I plan to commit
this shortly.

-- 
Nathan Bossart
Amazon Web Services: https://aws.amazon.com


Attachments:

  [text/x-diff] v4-0001-Adjust-extra-lines-generated-by-psql-to-be-valid-.patch (3.5K, ../../20230726213925.GF3310393@nathanxps13/2-v4-0001-Adjust-extra-lines-generated-by-psql-to-be-valid-.patch)
  download | inline diff:
From 50dbc196d19f4716bc9cb59bd36661d3e4cd299e Mon Sep 17 00:00:00 2001
From: Nathan Bossart <[email protected]>
Date: Wed, 26 Jul 2023 14:35:07 -0700
Subject: [PATCH v4 1/1] Adjust extra lines generated by psql to be valid SQL
 comments.
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

psql's --echo-hidden, --log-file, and --single-step options
generate extra lines to clearly separate queries from other output.
Presently, these extra lines are not valid SQL comments, which
makes them a hazard for anyone trying to copy/paste these decorated
queries into a client.  This commit replaces the starting and
ending asterisks in these extra lines with forward slashes so that
they are valid SQL comments that can be copy/pasted without
incident.

Author: Kirk Wolak
Reviewed-by: Pavel Stehule, Laurenz Albe, Tom Lane, Álvaro Herrera, Andrey Borodin
Discussion: https://postgr.es/m/CACLU5mTFJRJYtbvmZ26txGgmXWQo0hkGhH2o3hEquUPmSbGtBw%40mail.gmail.com
---
 src/bin/psql/command.c |  8 ++++----
 src/bin/psql/common.c  | 16 ++++++++--------
 2 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/src/bin/psql/command.c b/src/bin/psql/command.c
index 6733f008fd..1300869d79 100644
--- a/src/bin/psql/command.c
+++ b/src/bin/psql/command.c
@@ -5395,16 +5395,16 @@ echo_hidden_command(const char *query)
 {
 	if (pset.echo_hidden != PSQL_ECHO_HIDDEN_OFF)
 	{
-		printf(_("********* QUERY **********\n"
+		printf(_("/******** QUERY *********/\n"
 				 "%s\n"
-				 "**************************\n\n"), query);
+				 "/************************/\n\n"), query);
 		fflush(stdout);
 		if (pset.logfile)
 		{
 			fprintf(pset.logfile,
-					_("********* QUERY **********\n"
+					_("/******** QUERY *********/\n"
 					  "%s\n"
-					  "**************************\n\n"), query);
+					  "/************************/\n\n"), query);
 			fflush(pset.logfile);
 		}
 
diff --git a/src/bin/psql/common.c b/src/bin/psql/common.c
index 5973df2e39..10ad1f2538 100644
--- a/src/bin/psql/common.c
+++ b/src/bin/psql/common.c
@@ -589,16 +589,16 @@ PSQLexec(const char *query)
 
 	if (pset.echo_hidden != PSQL_ECHO_HIDDEN_OFF)
 	{
-		printf(_("********* QUERY **********\n"
+		printf(_("/******** QUERY *********/\n"
 				 "%s\n"
-				 "**************************\n\n"), query);
+				 "/************************/\n\n"), query);
 		fflush(stdout);
 		if (pset.logfile)
 		{
 			fprintf(pset.logfile,
-					_("********* QUERY **********\n"
+					_("/******** QUERY *********/\n"
 					  "%s\n"
-					  "**************************\n\n"), query);
+					  "/************************/\n\n"), query);
 			fflush(pset.logfile);
 		}
 
@@ -1060,9 +1060,9 @@ SendQuery(const char *query)
 		char		buf[3];
 
 		fflush(stderr);
-		printf(_("***(Single step mode: verify command)*******************************************\n"
+		printf(_("/**(Single step mode: verify command)******************************************/\n"
 				 "%s\n"
-				 "***(press return to proceed or enter x and return to cancel)********************\n"),
+				 "/**(press return to proceed or enter x and return to cancel)*******************/\n"),
 			   query);
 		fflush(stdout);
 		if (fgets(buf, sizeof(buf), stdin) != NULL)
@@ -1080,9 +1080,9 @@ SendQuery(const char *query)
 	if (pset.logfile)
 	{
 		fprintf(pset.logfile,
-				_("********* QUERY **********\n"
+				_("/******** QUERY *********/\n"
 				  "%s\n"
-				  "**************************\n\n"), query);
+				  "/************************/\n\n"), query);
 		fflush(pset.logfile);
 	}
 
-- 
2.25.1



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

* Re: psql: Could we get "-- " prefixing on the **** QUERY **** outputs? (ECHO_HIDDEN)
@ 2023-07-27 00:05  Nathan Bossart <[email protected]>
  parent: Nathan Bossart <[email protected]>
  1 sibling, 0 replies; 8+ messages in thread

From: Nathan Bossart @ 2023-07-27 00:05 UTC (permalink / raw)
  To: Pavel Stehule <[email protected]>; +Cc: Alvaro Herrera <[email protected]>; Andrey M. Borodin <[email protected]>; Kirk Wolak <[email protected]>; Tom Lane <[email protected]>; Laurenz Albe <[email protected]>; PostgreSQL Hackers <[email protected]>

On Wed, Jul 26, 2023 at 02:39:25PM -0700, Nathan Bossart wrote:
> Great.  I spent some time on the commit message in v4.  I plan to commit
> this shortly.

Committed.

-- 
Nathan Bossart
Amazon Web Services: https://aws.amazon.com






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

* Re: psql: Could we get "-- " prefixing on the **** QUERY **** outputs? (ECHO_HIDDEN)
@ 2023-10-24 05:09  Kirk Wolak <[email protected]>
  parent: Nathan Bossart <[email protected]>
  1 sibling, 1 reply; 8+ messages in thread

From: Kirk Wolak @ 2023-10-24 05:09 UTC (permalink / raw)
  To: Nathan Bossart <[email protected]>; +Cc: Pavel Stehule <[email protected]>; Alvaro Herrera <[email protected]>; Andrey M. Borodin <[email protected]>; Tom Lane <[email protected]>; Laurenz Albe <[email protected]>; PostgreSQL Hackers <[email protected]>

On Wed, Jul 26, 2023 at 5:39 PM Nathan Bossart <[email protected]>
wrote:

> On Wed, Jul 26, 2023 at 08:06:37AM +0200, Pavel Stehule wrote:
> > st 26. 7. 2023 v 6:22 odesílatel Nathan Bossart <
> [email protected]>
> > napsal:
> >> Barring additional feedback, I think this is ready for commit.
> >>
> >>
> > +1
>
> Great.  I spent some time on the commit message in v4.  I plan to commit
> this shortly.
>
> --
> Nathan Bossart
> Amazon Web Services: https://aws.amazon.com


Curious about this.  I expected to see the comments?  (is there a chance
that the translation piece is kicking in reverting them)?
(expecting / ********* QUERY **********/)

01:05:47 devuser@nctest= > \echo :VERSION_NAME  :VERSION_NUM
16.0 (Ubuntu 16.0-1.pgdg22.04+1) 160000
01:05:57 devuser@nctest= > \dn public
********* QUERY **********
SELECT n.nspname AS "Name",
  pg_catalog.pg_get_userbyid(n.nspowner) AS "Owner"
FROM pg_catalog.pg_namespace n
WHERE n.nspname OPERATOR(pg_catalog.~) '^(public)$' COLLATE
pg_catalog.default
ORDER BY 1;
**************************

********* QUERY **********
SELECT pubname
FROM pg_catalog.pg_publication p
     JOIN pg_catalog.pg_publication_namespace pn ON p.oid = pn.pnpubid
     JOIN pg_catalog.pg_namespace n ON n.oid = pn.pnnspid
WHERE n.nspname = 'public'
ORDER BY 1
**************************

      List of schemas
  Name  |       Owner
--------+-------------------
 public | pg_database_owner
(1 row)


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

* Re: psql: Could we get "-- " prefixing on the **** QUERY **** outputs? (ECHO_HIDDEN)
@ 2023-10-24 05:15  Pavel Stehule <[email protected]>
  parent: Kirk Wolak <[email protected]>
  0 siblings, 0 replies; 8+ messages in thread

From: Pavel Stehule @ 2023-10-24 05:15 UTC (permalink / raw)
  To: Kirk Wolak <[email protected]>; +Cc: Nathan Bossart <[email protected]>; Alvaro Herrera <[email protected]>; Andrey M. Borodin <[email protected]>; Tom Lane <[email protected]>; Laurenz Albe <[email protected]>; PostgreSQL Hackers <[email protected]>

Hi

út 24. 10. 2023 v 7:10 odesílatel Kirk Wolak <[email protected]> napsal:

> On Wed, Jul 26, 2023 at 5:39 PM Nathan Bossart <[email protected]>
> wrote:
>
>> On Wed, Jul 26, 2023 at 08:06:37AM +0200, Pavel Stehule wrote:
>> > st 26. 7. 2023 v 6:22 odesílatel Nathan Bossart <
>> [email protected]>
>> > napsal:
>> >> Barring additional feedback, I think this is ready for commit.
>> >>
>> >>
>> > +1
>>
>> Great.  I spent some time on the commit message in v4.  I plan to commit
>> this shortly.
>>
>> --
>> Nathan Bossart
>> Amazon Web Services: https://aws.amazon.com
>
>
> Curious about this.  I expected to see the comments?  (is there a chance
> that the translation piece is kicking in reverting them)?
> (expecting / ********* QUERY **********/)
>
> 01:05:47 devuser@nctest= > \echo :VERSION_NAME  :VERSION_NUM
> 16.0 (Ubuntu 16.0-1.pgdg22.04+1) 160000
> 01:05:57 devuser@nctest= > \dn public
> ********* QUERY **********
> SELECT n.nspname AS "Name",
>   pg_catalog.pg_get_userbyid(n.nspowner) AS "Owner"
> FROM pg_catalog.pg_namespace n
> WHERE n.nspname OPERATOR(pg_catalog.~) '^(public)$' COLLATE
> pg_catalog.default
> ORDER BY 1;
> **************************
>
> ********* QUERY **********
> SELECT pubname
> FROM pg_catalog.pg_publication p
>      JOIN pg_catalog.pg_publication_namespace pn ON p.oid = pn.pnpubid
>      JOIN pg_catalog.pg_namespace n ON n.oid = pn.pnnspid
> WHERE n.nspname = 'public'
> ORDER BY 1
> **************************
>
>       List of schemas
>   Name  |       Owner
> --------+-------------------
>  public | pg_database_owner
> (1 row)
>
>
It is working in psql 17, not in psql 16

(2023-10-24 07:14:35) postgres=# \echo :VERSION_NAME  :VERSION_NUM
17devel 170000
(2023-10-24 07:14:37) postgres=# \l+
/******** QUERY *********/
SELECT
  d.datname as "Name",
  pg_catalog.pg_get_userbyid(d.datdba) as "Owner",
  pg_catalog.pg_encoding_to_char(d.encoding) as "Encoding",
  CASE d.datlocprovider WHEN 'c' THEN 'libc' WHEN 'i' THEN 'icu' END AS
"Locale Provider",
...




>
>
>


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


end of thread, other threads:[~2023-10-24 05:15 UTC | newest]

Thread overview: 8+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2020-02-27 01:22 [PATCH v36 3/3] Avoid some calls to RelationGetRelationName Justin Pryzby <[email protected]>
2023-07-12 12:19 [PATCH 1/1] document RelationGetIndexAttrBitmap Alvaro Herrera <[email protected]>
2023-07-26 04:22 Re: psql: Could we get "-- " prefixing on the **** QUERY **** outputs? (ECHO_HIDDEN) Nathan Bossart <[email protected]>
2023-07-26 06:06 ` Re: psql: Could we get "-- " prefixing on the **** QUERY **** outputs? (ECHO_HIDDEN) Pavel Stehule <[email protected]>
2023-07-26 21:39   ` Re: psql: Could we get "-- " prefixing on the **** QUERY **** outputs? (ECHO_HIDDEN) Nathan Bossart <[email protected]>
2023-07-27 00:05     ` Re: psql: Could we get "-- " prefixing on the **** QUERY **** outputs? (ECHO_HIDDEN) Nathan Bossart <[email protected]>
2023-10-24 05:09     ` Re: psql: Could we get "-- " prefixing on the **** QUERY **** outputs? (ECHO_HIDDEN) Kirk Wolak <[email protected]>
2023-10-24 05:15       ` Re: psql: Could we get "-- " prefixing on the **** QUERY **** outputs? (ECHO_HIDDEN) Pavel Stehule <[email protected]>

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