Minor regression test fix

Started by Manfred Koizaralmost 24 years ago3 messagespatches
Jump to latest
#1Manfred Koizar
mkoi-pg@aon.at

I guess the intention was to test incomplete SELECT statements, not
missing semicolons.

I also added a SELECT statement without a target list.

Servus
Manfred

#2Bruce Momjian
bruce@momjian.us
In reply to: Manfred Koizar (#1)
Re: Minor regression test fix

Your patch has been added to the PostgreSQL unapplied patches list at:

http://207.106.42.251/cgi-bin/pgpatches

I will try to apply it within the next 48 hours.

---------------------------------------------------------------------------

Manfred Koizar wrote:

I guess the intention was to test incomplete SELECT statements, not
missing semicolons.

I also added a SELECT statement without a target list.

Servus
Manfred

diff -ruN ../base/src/test/regress/expected/errors.out src/test/regress/expected/errors.out
--- ../base/src/test/regress/expected/errors.out	2002-05-21 11:54:28.000000000 +0200
+++ src/test/regress/expected/errors.out	2002-08-29 12:04:29.000000000 +0200
@@ -2,7 +2,12 @@
-- ERRORS
--
-- bad in postquel, but ok in postsql
-select 1
+select 1;
+ ?column? 
+----------
+        1
+(1 row)
+
--
-- UNSUPPORTED STUFF
@@ -16,10 +21,14 @@
-- RETRIEVE
-- missing relation name 
-select
+select;
+ERROR:  parser: parse error at or near ";"
-- no such relation 
select * from nonesuch;
-ERROR:  parser: parse error at or near "select"
+ERROR:  Relation "nonesuch" does not exist
+-- missing target list
+select from pg_database;
+ERROR:  parser: parse error at or near "from"
-- bad name in target list
select nonesuch from pg_database;
ERROR:  Attribute "nonesuch" not found
diff -ruN ../base/src/test/regress/sql/errors.sql src/test/regress/sql/errors.sql
--- ../base/src/test/regress/sql/errors.sql	2002-04-18 22:01:11.000000000 +0200
+++ src/test/regress/sql/errors.sql	2002-08-29 12:00:12.000000000 +0200
@@ -3,7 +3,7 @@
--
-- bad in postquel, but ok in postsql
-select 1
+select 1;
--
@@ -20,11 +20,13 @@
-- RETRIEVE
-- missing relation name 
-select
+select;

-- no such relation
select * from nonesuch;

+-- missing target list
+select from pg_database;
-- bad name in target list
select nonesuch from pg_database;
-- bad attribute name on lhs of operator

---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to majordomo@postgresql.org)

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073
#3Bruce Momjian
bruce@momjian.us
In reply to: Manfred Koizar (#1)
Re: Minor regression test fix

Patch applied. Thanks.

---------------------------------------------------------------------------

Manfred Koizar wrote:

I guess the intention was to test incomplete SELECT statements, not
missing semicolons.

I also added a SELECT statement without a target list.

Servus
Manfred

diff -ruN ../base/src/test/regress/expected/errors.out src/test/regress/expected/errors.out
--- ../base/src/test/regress/expected/errors.out	2002-05-21 11:54:28.000000000 +0200
+++ src/test/regress/expected/errors.out	2002-08-29 12:04:29.000000000 +0200
@@ -2,7 +2,12 @@
-- ERRORS
--
-- bad in postquel, but ok in postsql
-select 1
+select 1;
+ ?column? 
+----------
+        1
+(1 row)
+
--
-- UNSUPPORTED STUFF
@@ -16,10 +21,14 @@
-- RETRIEVE
-- missing relation name 
-select
+select;
+ERROR:  parser: parse error at or near ";"
-- no such relation 
select * from nonesuch;
-ERROR:  parser: parse error at or near "select"
+ERROR:  Relation "nonesuch" does not exist
+-- missing target list
+select from pg_database;
+ERROR:  parser: parse error at or near "from"
-- bad name in target list
select nonesuch from pg_database;
ERROR:  Attribute "nonesuch" not found
diff -ruN ../base/src/test/regress/sql/errors.sql src/test/regress/sql/errors.sql
--- ../base/src/test/regress/sql/errors.sql	2002-04-18 22:01:11.000000000 +0200
+++ src/test/regress/sql/errors.sql	2002-08-29 12:00:12.000000000 +0200
@@ -3,7 +3,7 @@
--
-- bad in postquel, but ok in postsql
-select 1
+select 1;
--
@@ -20,11 +20,13 @@
-- RETRIEVE
-- missing relation name 
-select
+select;

-- no such relation
select * from nonesuch;

+-- missing target list
+select from pg_database;
-- bad name in target list
select nonesuch from pg_database;
-- bad attribute name on lhs of operator

---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to majordomo@postgresql.org)

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073