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

Commit8112bcf

Browse files
committed
Fix overly generic name in with.sql test.
Avoid the name "test". In the 10 branch, this could clash withalter_table.sql, as seen in the build farm. That other instance wasalready renamed in later branches by commit2cf8c7a, but it's good tofuture-proof the name here too.Back-patch to 10.Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us>Discussion:https://postgr.es/m/CA%2BhUKGJf4RAXUyAYVUcQawcptX%3DnhEco3SYpuPK5cCbA-F1eLA%40mail.gmail.com
1 parent1fb17b1 commit8112bcf

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

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

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3149,19 +3149,19 @@ with ordinality as (select 1 as x) select * from ordinality;
31493149
(1 row)
31503150

31513151
-- check sane response to attempt to modify CTE relation
3152-
WITHtest AS (SELECT 42) INSERT INTOtest VALUES (1);
3153-
ERROR: relation "test" does not exist
3154-
LINE 1: WITHtest AS (SELECT 42) INSERT INTOtest VALUES (1);
3155-
^
3152+
WITHwith_test AS (SELECT 42) INSERT INTOwith_test VALUES (1);
3153+
ERROR: relation "with_test" does not exist
3154+
LINE 1: WITHwith_test AS (SELECT 42) INSERT INTOwith_test VALUES (...
3155+
^
31563156
-- check response to attempt to modify table with same name as a CTE (perhaps
31573157
-- surprisingly it works, because CTEs don't hide tables from data-modifying
31583158
-- statements)
3159-
create temp tabletest (i int);
3160-
withtest as (select 42) insert intotest select * fromtest;
3161-
select * fromtest;
3159+
create temp tablewith_test (i int);
3160+
withwith_test as (select 42) insert intowith_test select * fromwith_test;
3161+
select * fromwith_test;
31623162
i
31633163
----
31643164
42
31653165
(1 row)
31663166

3167-
drop tabletest;
3167+
drop tablewith_test;

‎src/test/regress/sql/with.sql

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1459,12 +1459,12 @@ create table foo (with ordinality); -- fail, WITH is a reserved word
14591459
with ordinalityas (select1as x)select*from ordinality;
14601460

14611461
-- check sane response to attempt to modify CTE relation
1462-
WITHtestAS (SELECT42)INSERT INTOtestVALUES (1);
1462+
WITHwith_testAS (SELECT42)INSERT INTOwith_testVALUES (1);
14631463

14641464
-- check response to attempt to modify table with same name as a CTE (perhaps
14651465
-- surprisingly it works, because CTEs don't hide tables from data-modifying
14661466
-- statements)
1467-
create temp tabletest (iint);
1468-
withtestas (select42)insert intotestselect*fromtest;
1469-
select*fromtest;
1470-
droptabletest;
1467+
create temp tablewith_test (iint);
1468+
withwith_testas (select42)insert intowith_testselect*fromwith_test;
1469+
select*fromwith_test;
1470+
droptablewith_test;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp