Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit86749ea

Browse files
committed
Improve generated_stored test
It makes more sense to put the catalog sanity check at the end of thetest rather than at the beginning, so that it can also check whateverthe tests did rather than just whatever happened before the tests.Suggested-by: jian he <jian.universality@gmail.com>Discussion:https://www.postgresql.org/message-id/flat/a368248e-69e4-40be-9c07-6c3b5880b0a6@eisentraut.org
1 parent443a8e4 commit86749ea

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

‎src/test/regress/expected/generated_stored.out

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,3 @@
1-
-- sanity check of system catalog
2-
SELECT attrelid, attname, attgenerated FROM pg_attribute WHERE attgenerated NOT IN ('', 's');
3-
attrelid | attname | attgenerated
4-
----------+---------+--------------
5-
(0 rows)
6-
71
CREATE SCHEMA generated_stored_tests;
82
GRANT USAGE ON SCHEMA generated_stored_tests TO PUBLIC;
93
SET search_path = generated_stored_tests;
@@ -1356,3 +1350,9 @@ CREATE TABLE gtest28b (LIKE gtest28a INCLUDING GENERATED);
13561350
c | integer | | |
13571351
x | integer | | | generated always as (b * 2) stored
13581352

1353+
-- sanity check of system catalog
1354+
SELECT attrelid, attname, attgenerated FROM pg_attribute WHERE attgenerated NOT IN ('', 's');
1355+
attrelid | attname | attgenerated
1356+
----------+---------+--------------
1357+
(0 rows)
1358+

‎src/test/regress/sql/generated_stored.sql

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
-- sanity check of system catalog
2-
SELECT attrelid, attname, attgeneratedFROM pg_attributeWHERE attgenerated NOTIN ('','s');
3-
4-
51
CREATESCHEMAgenerated_stored_tests;
62
GRANT USAGEON SCHEMA generated_stored_tests TO PUBLIC;
73
SET search_path= generated_stored_tests;
@@ -675,3 +671,7 @@ ALTER TABLE gtest28a DROP COLUMN a;
675671
CREATETABLEgtest28b (LIKE gtest28a INCLUDING GENERATED);
676672

677673
\d gtest28*
674+
675+
676+
-- sanity check of system catalog
677+
SELECT attrelid, attname, attgeneratedFROM pg_attributeWHERE attgenerated NOTIN ('','s');

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp