pg.ddx.io pgsql-committers@postgresql.org mailing list archive
help / color / mirror / Atom feedpgsql: doc: add namespace column to pg_buffercache example query
8+ messages / 2 participants
[nested] [flat]
Commits from this thread:
2020-04-02 8da1538b39 bc96699b8f 42da1db7b9 68ef3037e4 d269f858b4 de7561f7d8 doc: remove unnecessary INNER keyword
* pgsql: doc: add namespace column to pg_buffercache example query
@ 2020-03-31 21:16 Bruce Momjian <bruce@momjian.us>
0 siblings, 0 replies; 8+ messages in thread
From: Bruce Momjian @ 2020-03-31 21:16 UTC (permalink / raw)
To: pgsql-committers@lists.postgresql.org
doc: add namespace column to pg_buffercache example query
Without the namespace, the table name could be ambiguous.
Reported-by: adunham@arbormetrix.com
Discussion: https://postgr.es/m/158155175140.23798.2189464781144503491@wrigleys.postgresql.org
Backpatch-through: 9.5
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/9b2009c4cfe1450228b941aba52e00e6bb938282
Modified Files
--------------
doc/src/sgml/pgbuffercache.sgml | 31 ++++++++++++++++---------------
1 file changed, 16 insertions(+), 15 deletions(-)
^ permalink raw reply [nested|flat] 8+ messages in thread
* pgsql: doc: add namespace column to pg_buffercache example query
@ 2020-03-31 21:16 Bruce Momjian <bruce@momjian.us>
2020-04-02 05:35 ` Re: pgsql: doc: add namespace column to pg_buffercache example query Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
0 siblings, 1 reply; 8+ messages in thread
From: Bruce Momjian @ 2020-03-31 21:16 UTC (permalink / raw)
To: pgsql-committers@lists.postgresql.org
doc: add namespace column to pg_buffercache example query
Without the namespace, the table name could be ambiguous.
Reported-by: adunham@arbormetrix.com
Discussion: https://postgr.es/m/158155175140.23798.2189464781144503491@wrigleys.postgresql.org
Backpatch-through: 9.5
Branch
------
REL_12_STABLE
Details
-------
https://git.postgresql.org/pg/commitdiff/d68470013618009241454b5578665994b7b36d02
Modified Files
--------------
doc/src/sgml/pgbuffercache.sgml | 31 ++++++++++++++++---------------
1 file changed, 16 insertions(+), 15 deletions(-)
^ permalink raw reply [nested|flat] 8+ messages in thread
* Re: pgsql: doc: add namespace column to pg_buffercache example query
2020-03-31 21:16 pgsql: doc: add namespace column to pg_buffercache example query Bruce Momjian <bruce@momjian.us>
@ 2020-04-02 05:35 ` Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
2020-04-02 21:42 ` Re: pgsql: doc: add namespace column to pg_buffercache example query Bruce Momjian <bruce@momjian.us>
0 siblings, 1 reply; 8+ messages in thread
From: Peter Eisentraut @ 2020-04-02 05:35 UTC (permalink / raw)
To: Bruce Momjian <bruce@momjian.us>; pgsql-committers@lists.postgresql.org
On 2020-03-31 23:16, Bruce Momjian wrote:
> doc: add namespace column to pg_buffercache example query
>
> Without the namespace, the table name could be ambiguous.
>
> Reported-by: adunham@arbormetrix.com
>
> Discussion: https://postgr.es/m/158155175140.23798.2189464781144503491@wrigleys.postgresql.org
>
> Backpatch-through: 9.5
<screen>
-regression=# SELECT c.relname, count(*) AS buffers
+regression=# SELECT n.nspname, c.relname, count(*) AS buffers
FROM pg_buffercache b INNER JOIN pg_class c
ON b.relfilenode = pg_relation_filenode(c.oid) AND
b.reldatabase IN (0, (SELECT oid FROM pg_database
WHERE datname = current_database()))
- GROUP BY c.relname
- ORDER BY 2 DESC
+ JOIN pg_namespace n ON n.oid = c.relnamespace
+ GROUP BY n.nspname, c.relname
+ ORDER BY 3 DESC
LIMIT 10;
Seems kind of confusing to use INNER JOIN once and then JOIN the other time.
--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
^ permalink raw reply [nested|flat] 8+ messages in thread
* Re: pgsql: doc: add namespace column to pg_buffercache example query
2020-03-31 21:16 pgsql: doc: add namespace column to pg_buffercache example query Bruce Momjian <bruce@momjian.us>
2020-04-02 05:35 ` Re: pgsql: doc: add namespace column to pg_buffercache example query Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
@ 2020-04-02 21:42 ` Bruce Momjian <bruce@momjian.us>
0 siblings, 0 replies; 8+ messages in thread
From: Bruce Momjian @ 2020-04-02 21:42 UTC (permalink / raw)
To: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>; +Cc: pgsql-committers@lists.postgresql.org
On Thu, Apr 2, 2020 at 07:35:50AM +0200, Peter Eisentraut wrote:
> On 2020-03-31 23:16, Bruce Momjian wrote:
> > doc: add namespace column to pg_buffercache example query
> >
> > Without the namespace, the table name could be ambiguous.
> >
> > Reported-by: adunham@arbormetrix.com
> >
> > Discussion: https://postgr.es/m/158155175140.23798.2189464781144503491@wrigleys.postgresql.org
> >
> > Backpatch-through: 9.5
>
> <screen>
> -regression=# SELECT c.relname, count(*) AS buffers
> +regression=# SELECT n.nspname, c.relname, count(*) AS buffers
> FROM pg_buffercache b INNER JOIN pg_class c
> ON b.relfilenode = pg_relation_filenode(c.oid) AND
> b.reldatabase IN (0, (SELECT oid FROM pg_database
> WHERE datname = current_database()))
> - GROUP BY c.relname
> - ORDER BY 2 DESC
> + JOIN pg_namespace n ON n.oid = c.relnamespace
> + GROUP BY n.nspname, c.relname
> + ORDER BY 3 DESC
> LIMIT 10;
>
> Seems kind of confusing to use INNER JOIN once and then JOIN the other time.
Agreed, INNER removed.
--
Bruce Momjian <bruce@momjian.us> https://momjian.us
EnterpriseDB https://enterprisedb.com
+ As you are, so once was I. As I am, so you will be. +
+ Ancient Roman grave inscription +
^ permalink raw reply [nested|flat] 8+ messages in thread
* pgsql: doc: add namespace column to pg_buffercache example query
@ 2020-03-31 21:16 Bruce Momjian <bruce@momjian.us>
0 siblings, 0 replies; 8+ messages in thread
From: Bruce Momjian @ 2020-03-31 21:16 UTC (permalink / raw)
To: pgsql-committers@lists.postgresql.org
doc: add namespace column to pg_buffercache example query
Without the namespace, the table name could be ambiguous.
Reported-by: adunham@arbormetrix.com
Discussion: https://postgr.es/m/158155175140.23798.2189464781144503491@wrigleys.postgresql.org
Backpatch-through: 9.5
Branch
------
REL_11_STABLE
Details
-------
https://git.postgresql.org/pg/commitdiff/9e8aec433a29e42fe67a072aa9d9bb1da26145d6
Modified Files
--------------
doc/src/sgml/pgbuffercache.sgml | 31 ++++++++++++++++---------------
1 file changed, 16 insertions(+), 15 deletions(-)
^ permalink raw reply [nested|flat] 8+ messages in thread
* pgsql: doc: add namespace column to pg_buffercache example query
@ 2020-03-31 21:16 Bruce Momjian <bruce@momjian.us>
0 siblings, 0 replies; 8+ messages in thread
From: Bruce Momjian @ 2020-03-31 21:16 UTC (permalink / raw)
To: pgsql-committers@lists.postgresql.org
doc: add namespace column to pg_buffercache example query
Without the namespace, the table name could be ambiguous.
Reported-by: adunham@arbormetrix.com
Discussion: https://postgr.es/m/158155175140.23798.2189464781144503491@wrigleys.postgresql.org
Backpatch-through: 9.5
Branch
------
REL_10_STABLE
Details
-------
https://git.postgresql.org/pg/commitdiff/7c8fb4a5e229547882db0577aacc85c18803f8bd
Modified Files
--------------
doc/src/sgml/pgbuffercache.sgml | 31 ++++++++++++++++---------------
1 file changed, 16 insertions(+), 15 deletions(-)
^ permalink raw reply [nested|flat] 8+ messages in thread
* pgsql: doc: add namespace column to pg_buffercache example query
@ 2020-03-31 21:16 Bruce Momjian <bruce@momjian.us>
0 siblings, 0 replies; 8+ messages in thread
From: Bruce Momjian @ 2020-03-31 21:16 UTC (permalink / raw)
To: pgsql-committers@lists.postgresql.org
doc: add namespace column to pg_buffercache example query
Without the namespace, the table name could be ambiguous.
Reported-by: adunham@arbormetrix.com
Discussion: https://postgr.es/m/158155175140.23798.2189464781144503491@wrigleys.postgresql.org
Backpatch-through: 9.5
Branch
------
REL9_6_STABLE
Details
-------
https://git.postgresql.org/pg/commitdiff/ce5d82f2d0fd160dfc3d52cff7ddc2490959b3f7
Modified Files
--------------
doc/src/sgml/pgbuffercache.sgml | 31 ++++++++++++++++---------------
1 file changed, 16 insertions(+), 15 deletions(-)
^ permalink raw reply [nested|flat] 8+ messages in thread
* pgsql: doc: add namespace column to pg_buffercache example query
@ 2020-03-31 21:16 Bruce Momjian <bruce@momjian.us>
0 siblings, 0 replies; 8+ messages in thread
From: Bruce Momjian @ 2020-03-31 21:16 UTC (permalink / raw)
To: pgsql-committers@lists.postgresql.org
doc: add namespace column to pg_buffercache example query
Without the namespace, the table name could be ambiguous.
Reported-by: adunham@arbormetrix.com
Discussion: https://postgr.es/m/158155175140.23798.2189464781144503491@wrigleys.postgresql.org
Backpatch-through: 9.5
Branch
------
REL9_5_STABLE
Details
-------
https://git.postgresql.org/pg/commitdiff/dd9f34ca006f1a18e2a80fbd9ee7efffed9b1e30
Modified Files
--------------
doc/src/sgml/pgbuffercache.sgml | 31 ++++++++++++++++---------------
1 file changed, 16 insertions(+), 15 deletions(-)
^ permalink raw reply [nested|flat] 8+ messages in thread
end of thread, other threads:[~2020-04-02 21:42 UTC | newest]
Thread overview: 8+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2020-03-31 21:16 pgsql: doc: add namespace column to pg_buffercache example query Bruce Momjian <bruce@momjian.us>
2020-03-31 21:16 pgsql: doc: add namespace column to pg_buffercache example query Bruce Momjian <bruce@momjian.us>
2020-04-02 05:35 ` Re: pgsql: doc: add namespace column to pg_buffercache example query Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
2020-04-02 21:42 ` Re: pgsql: doc: add namespace column to pg_buffercache example query Bruce Momjian <bruce@momjian.us>
2020-03-31 21:16 pgsql: doc: add namespace column to pg_buffercache example query Bruce Momjian <bruce@momjian.us>
2020-03-31 21:16 pgsql: doc: add namespace column to pg_buffercache example query Bruce Momjian <bruce@momjian.us>
2020-03-31 21:16 pgsql: doc: add namespace column to pg_buffercache example query Bruce Momjian <bruce@momjian.us>
2020-03-31 21:16 pgsql: doc: add namespace column to pg_buffercache example query Bruce Momjian <bruce@momjian.us>
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