postgresql/src/test/regress/expected/errors.out

262 lines
7.3 KiB
Plaintext
Raw Normal View History

2000-01-05 18:31:08 +01:00
--
2000-01-06 07:40:54 +01:00
-- ERRORS
2000-01-05 18:31:08 +01:00
--
-- bad in postquel, but ok in postsql
select 1
--
-- UNSUPPORTED STUFF
-- doesn't work
-- attachas nonesuch
--
-- doesn't work
-- notify pg_class
--
--
-- RETRIEVE
-- missing relation name
1997-04-27 05:57:34 +02:00
select
2000-01-05 18:31:08 +01:00
-- no such relation
1997-04-27 05:57:34 +02:00
select * from nonesuch;
ERROR: parser: parse error at or near "select"
2000-01-05 18:31:08 +01:00
-- bad name in target list
select nonesuch from pg_database;
ERROR: attribute 'nonesuch' not found
2000-01-05 18:31:08 +01:00
-- bad attribute name on lhs of operator
select * from pg_database where nonesuch = pg_database.datname;
ERROR: attribute 'nonesuch' not found
2000-01-05 18:31:08 +01:00
-- bad attribute name on rhs of operator
select * from pg_database where pg_database.datname = nonesuch;
ERROR: attribute 'nonesuch' not found
2000-01-05 18:31:08 +01:00
-- bad select distinct on syntax, distinct attribute missing
select distinct on foobar from pg_database;
ERROR: parser: parse error at or near "from"
2000-01-05 18:31:08 +01:00
-- bad select distinct on syntax, distinct attribute not in target list
select distinct on foobar * from pg_database;
ERROR: All fields in the UNIQUE ON clause must appear in the target list
2000-01-05 18:31:08 +01:00
--
-- DELETE
-- missing relation name (this had better not wildcard!)
delete from;
ERROR: parser: parse error at or near ""
-- no such relation
delete from nonesuch;
ERROR: Relation 'nonesuch' does not exist
2000-01-05 18:31:08 +01:00
--
-- DESTROY
-- missing relation name (this had better not wildcard!)
drop table;
ERROR: parser: parse error at or near ""
-- no such relation
drop table nonesuch;
ERROR: Relation 'nonesuch' does not exist
2000-01-05 18:31:08 +01:00
--
-- RENAME
-- relation renaming
-- missing relation name
alter table rename;
ERROR: parser: parse error at or near ""
-- no such relation
alter table nonesuch rename to newnonesuch;
ERROR: Relation 'nonesuch' does not exist
2000-01-05 18:31:08 +01:00
-- no such relation
alter table nonesuch rename to stud_emp;
ERROR: Relation 'nonesuch' does not exist
2000-01-05 18:31:08 +01:00
-- system relation
alter table stud_emp rename to pg_stud_emp;
ERROR: renamerel: Illegal class name: "pg_stud_emp" -- pg_ is reserved for system catalogs
2000-01-05 18:31:08 +01:00
-- conflict
alter table stud_emp rename to aggtest;
ERROR: renamerel: relation "aggtest" exists
2000-01-05 18:31:08 +01:00
-- self-conflict
alter table stud_emp rename to stud_emp;
ERROR: renamerel: relation "stud_emp" exists
2000-01-05 18:31:08 +01:00
-- attribute renaming
-- no such relation
alter table nonesuchrel rename column nonesuchatt to newnonesuchatt;
ERROR: Relation 'nonesuchrel' does not exist
2000-01-05 18:31:08 +01:00
-- no such attribute
alter table emp rename column nonesuchatt to newnonesuchatt;
ERROR: renameatt: attribute "nonesuchatt" nonexistent
2000-01-05 18:31:08 +01:00
-- conflict
alter table emp rename column salary to manager;
ERROR: renameatt: attribute "manager" exists
2000-01-05 18:31:08 +01:00
-- conflict
alter table emp rename column salary to oid;
ERROR: renameatt: attribute "oid" exists
2000-01-05 18:31:08 +01:00
--
-- TRANSACTION STUFF
-- not in a xact
abort;
NOTICE: UserAbortTransactionBlock and not in in-progress state
2000-01-05 18:31:08 +01:00
-- not in a xact
end;
NOTICE: EndTransactionBlock and not inprogress/abort state
2000-01-05 18:31:08 +01:00
--
-- DEFINE AGGREGATE
-- left out finalfunc
create aggregate newavg1 (sfunc1 = int4pl,
1997-04-27 05:57:34 +02:00
basetype = int4,
stype1 = int4,
sfunc2 = int4inc,
2000-01-05 18:31:08 +01:00
stype2 = int4,
1997-04-27 05:57:34 +02:00
initcond1 = '0',
initcond2 = '0');
ERROR: AggregateCreate: Aggregate must have final function with both transition functions
2000-01-05 18:31:08 +01:00
-- sfunc return type disagreement
create aggregate newavg2 (sfunc1 = int4pl,
1997-04-27 05:57:34 +02:00
basetype = int4,
stype1 = int4,
sfunc2 = int2inc,
stype2 = int2,
finalfunc = int4div,
initcond1 = '0',
initcond2 = '0');
ERROR: AggregateCreate: 'int4div'('int4','int2') does not exist
2000-01-05 18:31:08 +01:00
-- sfunc/finalfunc type disagreement
create aggregate newavg3 (sfunc1 = int4pl,
1997-04-27 05:57:34 +02:00
basetype = int4,
stype1 = int4,
sfunc2 = int4inc,
stype2 = int4,
finalfunc = int2div,
initcond1 = '0',
initcond2 = '0');
ERROR: AggregateCreate: 'int2div'('int4','int4') does not exist
2000-01-05 18:31:08 +01:00
-- left out basetype
create aggregate newcnt1 (sfunc2 = int4inc,
1997-04-27 05:57:34 +02:00
stype2 = int4,
initcond2 = '0');
ERROR: Define: "basetype" unspecified
2000-01-05 18:31:08 +01:00
-- left out initcond2 (for sfunc2)
create aggregate newcnt1 (sfunc2 = int4inc,
1997-04-27 05:57:34 +02:00
basetype = int4,
stype2 = int4);
ERROR: AggregateCreate: transition function 2 MUST have an initial value
2000-01-05 18:31:08 +01:00
--
-- REMOVE INDEX
-- missing index name
drop index;
ERROR: parser: parse error at or near ""
-- bad index name
drop index 314159;
ERROR: parser: parse error at or near "314159"
2000-01-05 18:31:08 +01:00
-- no such index
drop index nonesuch;
ERROR: index "nonesuch" nonexistent
2000-01-05 18:31:08 +01:00
--
-- REMOVE AGGREGATE
-- missing aggregate name
drop aggregate;
ERROR: parser: parse error at or near ""
-- bad aggregate name
drop aggregate 314159;
ERROR: parser: parse error at or near "314159"
2000-01-05 18:31:08 +01:00
-- no such aggregate
drop aggregate nonesuch;
ERROR: parser: parse error at or near ""
-- missing aggregate type
drop aggregate newcnt1;
ERROR: parser: parse error at or near ""
-- bad aggregate type
drop aggregate newcnt nonesuch;
ERROR: RemoveAggregate: type 'nonesuch' does not exist
2000-01-05 18:31:08 +01:00
-- no such aggregate for type
drop aggregate newcnt float4;
ERROR: RemoveAggregate: aggregate 'newcnt' for 'float4' does not exist
2000-01-05 18:31:08 +01:00
--
-- REMOVE FUNCTION
-- missing function name
drop function ();
ERROR: parser: parse error at or near "("
2000-01-05 18:31:08 +01:00
-- bad function name
drop function 314159();
ERROR: parser: parse error at or near "314159"
2000-01-05 18:31:08 +01:00
-- no such function
drop function nonesuch();
1998-05-10 01:50:24 +02:00
ERROR: RemoveFunction: function 'nonesuch()' does not exist
2000-01-05 18:31:08 +01:00
--
-- REMOVE TYPE
-- missing type name
drop type;
ERROR: parser: parse error at or near ""
-- bad type name
drop type 314159;
ERROR: parser: parse error at or near "314159"
2000-01-05 18:31:08 +01:00
-- no such type
drop type nonesuch;
ERROR: RemoveType: type 'nonesuch' does not exist
2000-01-05 18:31:08 +01:00
--
-- DROP OPERATOR
-- missing everything
drop operator;
ERROR: parser: parse error at or near ""
-- bad operator name
drop operator equals;
ERROR: parser: parse error at or near "equals"
2000-01-05 18:31:08 +01:00
-- missing type list
drop operator ===;
ERROR: parser: parse error at or near ""
-- missing parentheses
drop operator int4, int4;
ERROR: parser: parse error at or near "int4"
2000-01-05 18:31:08 +01:00
-- missing operator name
drop operator (int4, int4);
ERROR: parser: parse error at or near "("
2000-01-05 18:31:08 +01:00
-- missing type list contents
drop operator === ();
ERROR: parser: parse error at or near ")"
2000-01-05 18:31:08 +01:00
-- no such operator
drop operator === (int4);
ERROR: parser: argument type missing (use NONE for unary operators)
2000-01-05 18:31:08 +01:00
-- no such operator by that name
drop operator === (int4, int4);
ERROR: RemoveOperator: binary operator '===' taking 'int4' and 'int4' does not exist
2000-01-05 18:31:08 +01:00
-- no such type1
drop operator = (nonesuch);
ERROR: parser: argument type missing (use NONE for unary operators)
2000-01-05 18:31:08 +01:00
-- no such type1
drop operator = ( , int4);
ERROR: parser: parse error at or near ","
2000-01-05 18:31:08 +01:00
-- no such type1
drop operator = (nonesuch, int4);
ERROR: RemoveOperator: type 'nonesuch' does not exist
2000-01-05 18:31:08 +01:00
-- no such type2
drop operator = (int4, nonesuch);
ERROR: RemoveOperator: type 'nonesuch' does not exist
2000-01-05 18:31:08 +01:00
-- no such type2
drop operator = (int4, );
ERROR: parser: parse error at or near ")"
2000-01-05 18:31:08 +01:00
--
-- DROP RULE
-- missing rule name
drop rule;
ERROR: parser: parse error at or near ""
-- bad rule name
drop rule 314159;
ERROR: parser: parse error at or near "314159"
2000-01-05 18:31:08 +01:00
-- no such rule
drop rule nonesuch;
ERROR: Rule or view 'nonesuch' not found
2000-01-05 18:31:08 +01:00
-- bad keyword
drop tuple rule nonesuch;
ERROR: parser: parse error at or near "tuple"
2000-01-05 18:31:08 +01:00
-- no such rule
drop instance rule nonesuch;
ERROR: parser: parse error at or near "instance"
2000-01-05 18:31:08 +01:00
-- no such rule
drop rewrite rule nonesuch;
ERROR: parser: parse error at or near "rewrite"