OSDN Git Service

f767c875a9b47632e3f81cc93859a2c0e1146b00
[pg-rex/syncrep.git] / src / test / regress / expected / errors.out
1 --
2 -- ERRORS
3 --
4 -- bad in postquel, but ok in postsql
5 select 1
6 --
7 -- UNSUPPORTED STUFF
8  
9 -- doesn't work 
10 -- attachas nonesuch
11 --
12 -- doesn't work 
13 -- notify pg_class
14 --
15 --
16 -- RETRIEVE
17  
18 -- missing relation name 
19 select
20 -- no such relation 
21 select * from nonesuch;
22 ERROR:  parser: parse error at or near "select"
23 -- bad name in target list
24 select nonesuch from pg_database;
25 ERROR:  Attribute 'nonesuch' not found
26 -- bad attribute name on lhs of operator
27 select * from pg_database where nonesuch = pg_database.datname;
28 ERROR:  Attribute 'nonesuch' not found
29 -- bad attribute name on rhs of operator
30 select * from pg_database where pg_database.datname = nonesuch;
31 ERROR:  Attribute 'nonesuch' not found
32 -- bad select distinct on syntax, distinct attribute missing
33 select distinct on (foobar) from pg_database;
34 ERROR:  parser: parse error at or near "from"
35 -- bad select distinct on syntax, distinct attribute not in target list
36 select distinct on (foobar) * from pg_database;
37 ERROR:  Attribute 'foobar' not found
38 --
39 -- DELETE
40  
41 -- missing relation name (this had better not wildcard!) 
42 delete from;
43 ERROR:  parser: parse error at or near ";"
44 -- no such relation 
45 delete from nonesuch;
46 ERROR:  Relation "nonesuch" does not exist
47 --
48 -- DESTROY
49  
50 -- missing relation name (this had better not wildcard!) 
51 drop table;
52 ERROR:  parser: parse error at or near ";"
53 -- no such relation 
54 drop table nonesuch;
55 ERROR:  table "nonesuch" does not exist
56 --
57 -- RENAME
58  
59 -- relation renaming 
60 -- missing relation name 
61 alter table rename;
62 ERROR:  parser: parse error at or near ";"
63 -- no such relation 
64 alter table nonesuch rename to newnonesuch;
65 ERROR:  Relation "nonesuch" does not exist
66 -- no such relation 
67 alter table nonesuch rename to stud_emp;
68 ERROR:  Relation "nonesuch" does not exist
69 -- system relation 
70 alter table stud_emp rename to pg_stud_emp;
71 ERROR:  renamerel: Illegal class name: "pg_stud_emp" -- pg_ is reserved for system catalogs
72 -- conflict 
73 alter table stud_emp rename to aggtest;
74 ERROR:  renamerel: relation "aggtest" exists
75 -- self-conflict 
76 alter table stud_emp rename to stud_emp;
77 ERROR:  renamerel: relation "stud_emp" exists
78 -- attribute renaming 
79 -- no such relation 
80 alter table nonesuchrel rename column nonesuchatt to newnonesuchatt;
81 ERROR:  Relation "nonesuchrel" does not exist
82 -- no such attribute 
83 alter table emp rename column nonesuchatt to newnonesuchatt;
84 ERROR:  renameatt: attribute "nonesuchatt" does not exist
85 -- conflict 
86 alter table emp rename column salary to manager;
87 ERROR:  renameatt: attribute "manager" exists
88 -- conflict 
89 alter table emp rename column salary to oid;
90 ERROR:  renameatt: attribute "oid" exists
91 --
92 -- TRANSACTION STUFF
93  
94 -- not in a xact 
95 abort;
96 WARNING:  ROLLBACK: no transaction in progress
97 -- not in a xact 
98 end;
99 WARNING:  COMMIT: no transaction in progress
100 --
101 -- DEFINE AGGREGATE
102 -- sfunc/finalfunc type disagreement 
103 create aggregate newavg2 (sfunc = int4pl,
104                           basetype = int4,
105                           stype = int4,
106                           finalfunc = int2um,
107                           initcond = '0');
108 ERROR:  AggregateCreate: function 'int2um(int4)' does not exist
109 -- left out basetype
110 create aggregate newcnt1 (sfunc = int4inc,
111                           stype = int4,
112                           initcond = '0');
113 ERROR:  Define: "basetype" unspecified
114 --
115 -- REMOVE INDEX
116  
117 -- missing index name 
118 drop index;
119 ERROR:  parser: parse error at or near ";"
120 -- bad index name 
121 drop index 314159;
122 ERROR:  parser: parse error at or near "314159"
123 -- no such index 
124 drop index nonesuch;
125 ERROR:  index "nonesuch" does not exist
126 --
127 -- REMOVE AGGREGATE
128  
129 -- missing aggregate name 
130 drop aggregate;
131 ERROR:  parser: parse error at or near ";"
132 -- missing aggregate type
133 drop aggregate newcnt1;
134 ERROR:  parser: parse error at or near ";"
135 -- bad aggregate name 
136 drop aggregate 314159 (int);
137 ERROR:  parser: parse error at or near "314159"
138 -- bad aggregate type
139 drop aggregate newcnt (nonesuch);
140 ERROR:  RemoveAggregate: type 'nonesuch' does not exist
141 -- no such aggregate 
142 drop aggregate nonesuch (int4);
143 ERROR:  RemoveAggregate: aggregate 'nonesuch' for type integer does not exist
144 -- no such aggregate for type
145 drop aggregate newcnt (float4);
146 ERROR:  RemoveAggregate: aggregate 'newcnt' for type real does not exist
147 --
148 -- REMOVE FUNCTION
149  
150 -- missing function name 
151 drop function ();
152 ERROR:  parser: parse error at or near "("
153 -- bad function name 
154 drop function 314159();
155 ERROR:  parser: parse error at or near "314159"
156 -- no such function 
157 drop function nonesuch();
158 ERROR:  RemoveFunction: function 'nonesuch()' does not exist
159 --
160 -- REMOVE TYPE
161  
162 -- missing type name 
163 drop type;
164 ERROR:  parser: parse error at or near ";"
165 -- bad type name 
166 drop type 314159;
167 ERROR:  parser: parse error at or near "314159"
168 -- no such type 
169 drop type nonesuch;
170 ERROR:  RemoveType: type 'nonesuch' does not exist
171 --
172 -- DROP OPERATOR
173  
174 -- missing everything 
175 drop operator;
176 ERROR:  parser: parse error at or near ";"
177 -- bad operator name 
178 drop operator equals;
179 ERROR:  parser: parse error at or near "equals"
180 -- missing type list 
181 drop operator ===;
182 ERROR:  parser: parse error at or near ";"
183 -- missing parentheses 
184 drop operator int4, int4;
185 ERROR:  parser: parse error at or near "int4"
186 -- missing operator name 
187 drop operator (int4, int4);
188 ERROR:  parser: parse error at or near "("
189 -- missing type list contents 
190 drop operator === ();
191 ERROR:  parser: parse error at or near ")"
192 -- no such operator 
193 drop operator === (int4);
194 ERROR:  parser: argument type missing (use NONE for unary operators)
195 -- no such operator by that name 
196 drop operator === (int4, int4);
197 ERROR:  RemoveOperator: binary operator '===' taking 'int4' and 'int4' does not exist
198 -- no such type1 
199 drop operator = (nonesuch);
200 ERROR:  parser: argument type missing (use NONE for unary operators)
201 -- no such type1 
202 drop operator = ( , int4);
203 ERROR:  parser: parse error at or near ","
204 -- no such type1 
205 drop operator = (nonesuch, int4);
206 ERROR:  RemoveOperator: type 'nonesuch' does not exist
207 -- no such type2 
208 drop operator = (int4, nonesuch);
209 ERROR:  RemoveOperator: type 'nonesuch' does not exist
210 -- no such type2 
211 drop operator = (int4, );
212 ERROR:  parser: parse error at or near ")"
213 --
214 -- DROP RULE
215  
216 -- missing rule name 
217 drop rule;
218 ERROR:  parser: parse error at or near ";"
219 -- bad rule name 
220 drop rule 314159;
221 ERROR:  parser: parse error at or near "314159"
222 -- no such rule 
223 drop rule nonesuch;
224 ERROR:  Rule or view "nonesuch" not found
225 -- bad keyword 
226 drop tuple rule nonesuch;
227 ERROR:  parser: parse error at or near "tuple"
228 -- no such rule 
229 drop instance rule nonesuch;
230 ERROR:  parser: parse error at or near "instance"
231 -- no such rule 
232 drop rewrite rule nonesuch;
233 ERROR:  parser: parse error at or near "rewrite"