-
Notifications
You must be signed in to change notification settings - Fork 59
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Fixing issues with GUC initialization and function renames * Fixed regression issues with PG16
- Loading branch information
1 parent
f222879
commit 9cf2fb8
Showing
7 changed files
with
341 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,199 @@ | ||
CREATE EXTENSION pg_stat_monitor; | ||
SELECT pg_stat_monitor_reset(); | ||
pg_stat_monitor_reset | ||
----------------------- | ||
|
||
(1 row) | ||
|
||
CREATE TABLE foo1(a int); | ||
CREATE TABLE foo2(b int); | ||
CREATE TABLE foo3(c int); | ||
CREATE TABLE foo4(d int); | ||
-- test the simple table names | ||
SELECT pg_stat_monitor_reset(); | ||
pg_stat_monitor_reset | ||
----------------------- | ||
|
||
(1 row) | ||
|
||
SELECT * FROM foo1; | ||
a | ||
--- | ||
(0 rows) | ||
|
||
SELECT * FROM foo1, foo2; | ||
a | b | ||
---+--- | ||
(0 rows) | ||
|
||
SELECT * FROM foo1, foo2, foo3; | ||
a | b | c | ||
---+---+--- | ||
(0 rows) | ||
|
||
SELECT * FROM foo1, foo2, foo3, foo4; | ||
a | b | c | d | ||
---+---+---+--- | ||
(0 rows) | ||
|
||
SELECT query, relations from pg_stat_monitor ORDER BY query collate "C"; | ||
query | relations | ||
--------------------------------------+--------------------------------------------------- | ||
SELECT * FROM foo1 | {public.foo1} | ||
SELECT * FROM foo1, foo2 | {public.foo1,public.foo2} | ||
SELECT * FROM foo1, foo2, foo3 | {public.foo1,public.foo2,public.foo3} | ||
SELECT * FROM foo1, foo2, foo3, foo4 | {public.foo1,public.foo2,public.foo3,public.foo4} | ||
SELECT pg_stat_monitor_reset() | | ||
(5 rows) | ||
|
||
SELECT pg_stat_monitor_reset(); | ||
pg_stat_monitor_reset | ||
----------------------- | ||
|
||
(1 row) | ||
|
||
-- test the schema qualified table | ||
CREATE SCHEMA sch1; | ||
CREATE SCHEMA sch2; | ||
CREATE SCHEMA sch3; | ||
CREATE SCHEMA sch4; | ||
CREATE TABLE sch1.foo1(a int); | ||
CREATE TABLE sch2.foo2(b int); | ||
CREATE TABLE sch3.foo3(c int); | ||
CREATE TABLE sch4.foo4(d int); | ||
SELECT pg_stat_monitor_reset(); | ||
pg_stat_monitor_reset | ||
----------------------- | ||
|
||
(1 row) | ||
|
||
SELECT * FROM sch1.foo1; | ||
a | ||
--- | ||
(0 rows) | ||
|
||
SELECT * FROM sch1.foo1, sch2.foo2; | ||
a | b | ||
---+--- | ||
(0 rows) | ||
|
||
SELECT * FROM sch1.foo1, sch2.foo2, sch3.foo3; | ||
a | b | c | ||
---+---+--- | ||
(0 rows) | ||
|
||
SELECT * FROM sch1.foo1, sch2.foo2, sch3.foo3, sch4.foo4; | ||
a | b | c | d | ||
---+---+---+--- | ||
(0 rows) | ||
|
||
SELECT query, relations from pg_stat_monitor ORDER BY query collate "C"; | ||
query | relations | ||
----------------------------------------------------------+------------------------------------------- | ||
SELECT * FROM sch1.foo1 | {sch1.foo1} | ||
SELECT * FROM sch1.foo1, sch2.foo2 | {sch1.foo1,sch2.foo2} | ||
SELECT * FROM sch1.foo1, sch2.foo2, sch3.foo3 | {sch1.foo1,sch2.foo2,sch3.foo3} | ||
SELECT * FROM sch1.foo1, sch2.foo2, sch3.foo3, sch4.foo4 | {sch1.foo1,sch2.foo2,sch3.foo3,sch4.foo4} | ||
SELECT pg_stat_monitor_reset() | | ||
(5 rows) | ||
|
||
SELECT pg_stat_monitor_reset(); | ||
pg_stat_monitor_reset | ||
----------------------- | ||
|
||
(1 row) | ||
|
||
SELECT pg_stat_monitor_reset(); | ||
pg_stat_monitor_reset | ||
----------------------- | ||
|
||
(1 row) | ||
|
||
SELECT * FROM sch1.foo1, foo1; | ||
a | a | ||
---+--- | ||
(0 rows) | ||
|
||
SELECT * FROM sch1.foo1, sch2.foo2, foo1, foo2; | ||
a | b | a | b | ||
---+---+---+--- | ||
(0 rows) | ||
|
||
SELECT query, relations from pg_stat_monitor ORDER BY query; | ||
query | relations | ||
------------------------------------------------+----------------------------------------------- | ||
SELECT * FROM sch1.foo1, foo1 | {sch1.foo1,public.foo1} | ||
SELECT * FROM sch1.foo1, sch2.foo2, foo1, foo2 | {sch1.foo1,sch2.foo2,public.foo1,public.foo2} | ||
SELECT pg_stat_monitor_reset() | | ||
(3 rows) | ||
|
||
SELECT pg_stat_monitor_reset(); | ||
pg_stat_monitor_reset | ||
----------------------- | ||
|
||
(1 row) | ||
|
||
-- test the view | ||
CREATE VIEW v1 AS SELECT * from foo1; | ||
CREATE VIEW v2 AS SELECT * from foo1,foo2; | ||
CREATE VIEW v3 AS SELECT * from foo1,foo2,foo3; | ||
CREATE VIEW v4 AS SELECT * from foo1,foo2,foo3,foo4; | ||
SELECT pg_stat_monitor_reset(); | ||
pg_stat_monitor_reset | ||
----------------------- | ||
|
||
(1 row) | ||
|
||
SELECT * FROM v1; | ||
a | ||
--- | ||
(0 rows) | ||
|
||
SELECT * FROM v1,v2; | ||
a | a | b | ||
---+---+--- | ||
(0 rows) | ||
|
||
SELECT * FROM v1,v2,v3; | ||
a | a | b | a | b | c | ||
---+---+---+---+---+--- | ||
(0 rows) | ||
|
||
SELECT * FROM v1,v2,v3,v4; | ||
a | a | b | a | b | c | a | b | c | d | ||
---+---+---+---+---+---+---+---+---+--- | ||
(0 rows) | ||
|
||
SELECT query, relations from pg_stat_monitor ORDER BY query collate "C"; | ||
query | relations | ||
--------------------------------+----------------------------------------------------------------------------------------------- | ||
SELECT * FROM v1 | {public.v1*,public.foo1} | ||
SELECT * FROM v1,v2 | {public.v1*,public.v2*,public.foo1,public.foo2} | ||
SELECT * FROM v1,v2,v3 | {public.v1*,public.v2*,public.v3*,public.foo1,public.foo2,public.foo3} | ||
SELECT * FROM v1,v2,v3,v4 | {public.v1*,public.v2*,public.v3*,public.v4*,public.foo1,public.foo2,public.foo3,public.foo4} | ||
SELECT pg_stat_monitor_reset() | | ||
(5 rows) | ||
|
||
SELECT pg_stat_monitor_reset(); | ||
pg_stat_monitor_reset | ||
----------------------- | ||
|
||
(1 row) | ||
|
||
DROP VIEW v1; | ||
DROP VIEW v2; | ||
DROP VIEW v3; | ||
DROP VIEW v4; | ||
DROP TABLE foo1; | ||
DROP TABLE foo2; | ||
DROP TABLE foo3; | ||
DROP TABLE foo4; | ||
DROP TABLE sch1.foo1; | ||
DROP TABLE sch2.foo2; | ||
DROP TABLE sch3.foo3; | ||
DROP TABLE sch4.foo4; | ||
DROP SCHEMA sch1; | ||
DROP SCHEMA sch2; | ||
DROP SCHEMA sch3; | ||
DROP SCHEMA sch4; | ||
DROP EXTENSION pg_stat_monitor; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.