--
--- Check constraints
+-- CONSTRAINTS
-- Constraints can be specified with:
-- - DEFAULT clause
-- - CHECK clauses
--
--- create.source
---
+-- COPY
--
-- CLASS POPULATION
COPY bt_txt_heap FROM '_OBJWD_/data/desc.data';
COPY bt_f8_heap FROM '_OBJWD_/data/hash.data';
+
--
--- create.source
---
+-- CREATE_FUNCTION_1
--
CREATE FUNCTION widget_in(opaque)
CREATE FUNCTION check_primary_key ()
RETURNS opaque
AS '_OBJWD_/../../../contrib/spi/refint_DLSUFFIX_'
- LANGUAGE 'c'
-;
+ LANGUAGE 'c';
CREATE FUNCTION check_foreign_key ()
RETURNS opaque
AS '_OBJWD_/../../../contrib/spi/refint_DLSUFFIX_'
- LANGUAGE 'c'
-;
+ LANGUAGE 'c';
CREATE FUNCTION autoinc ()
RETURNS opaque
AS '_OBJWD_/../../../contrib/spi/autoinc_DLSUFFIX_'
- LANGUAGE 'c'
-;
+ LANGUAGE 'c';
CREATE FUNCTION funny_dup17 ()
RETURNS opaque
AS '_OBJWD_/regress_DLSUFFIX_'
- LANGUAGE 'c'
-;
+ LANGUAGE 'c';
CREATE FUNCTION ttdummy ()
RETURNS opaque
AS '_OBJWD_/regress_DLSUFFIX_'
- LANGUAGE 'c'
-;
+ LANGUAGE 'c';
CREATE FUNCTION set_ttdummy (int4)
RETURNS int4
AS '_OBJWD_/regress_DLSUFFIX_'
- LANGUAGE 'c'
-;
+ LANGUAGE 'c';
+
--
--- FUNCTION DEFINITIONS
+-- CREATE_FUNCTION_2
--
CREATE FUNCTION hobbies(person)
RETURNS setof hobbies_r
LANGUAGE 'c';
--
--- FUNCTION DYNAMIC LOADING
+-- Function dynamic loading
--
LOAD '_OBJWD_/regress_DLSUFFIX_';
--
--- install_plpgsql.source
---
+-- INSTALL_PLPGSQL
--
CREATE FUNCTION plpgsql_call_handler()
CREATE TRUSTED PROCEDURAL LANGUAGE 'plpgsql'
HANDLER plpgsql_call_handler
LANCOMPILER 'PL/pgSQL';
+
--
--- replace
---
+-- MISC
+
--
-- BTREE
--
SELECT *
FROM b_star* x
- WHERE x.b = 'bumble'::text or x.a < 3;
+ WHERE x.b = text 'bumble' or x.a < 3;
SELECT class, a
FROM c_star* x
- WHERE x.c ~ 'hi'::text;
+ WHERE x.c ~ text 'hi';
SELECT class, b, c
FROM d_star* x
ALTER TABLE a_star* ADD COLUMN a text;
--UPDATE b_star*
--- SET a = 'gazpacho'::text
+-- SET a = text 'gazpacho'
-- WHERE aa > 4;
SELECT class, aa, a FROM a_star*;
SELECT user_relns() AS user_relns
ORDER BY user_relns;
---SELECT name(equipment(hobby_construct('skywalking'::text, 'mer'::text))) AS equip_name;
+--SELECT name(equipment(hobby_construct(text 'skywalking', text 'mer'))) AS equip_name;
--
--
-- rewrite rules
--
+
--
-- AGGREGATES
--
+
SELECT avg(four) AS avg_1 FROM onek;
SELECT avg(a) AS avg_32 FROM aggtest WHERE a < 100;
--
-- add attribute
--
+
CREATE TABLE tmp (initial int4);
ALTER TABLE tmp ADD COLUMN a int4;
--
-- ARRAYS
--
+
SELECT * FROM arrtest;
SELECT arrtest.a[1],
--
--- AGGREGATE DEFINITIONS
+-- CREATE_AGGREGATE
--
-- all functions CREATEd
--
--- CREATE ancillary data structures (i.e. indices)
+-- CREATE_INDEX
+-- Create ancillary data structures (i.e. indices)
--
--
--
--- create.source
---
+-- CREATE_MISC
--
-- CLASS POPULATION
--
--- OPERATOR DEFINITIONS
+-- CREATE_OPERATOR
--
+
CREATE OPERATOR ## (
leftarg = path,
rightarg = path,
--
--- create.source
---
+-- CREATE_TABLE
--
--
CREATE TABLE onek (
unique1 int4,
unique2 int4,
- two int4,
+ two int4,
four int4,
- ten int4,
+ ten int4,
twenty int4,
hundred int4,
thousand int4,
twothousand int4,
fivethous int4,
tenthous int4,
- odd int4,
+ odd int4,
even int4,
stringu1 name,
stringu2 name,
CREATE TABLE tenk1 (
unique1 int4,
unique2 int4,
- two int4,
+ two int4,
four int4,
- ten int4,
+ ten int4,
twenty int4,
hundred int4,
thousand int4,
twothousand int4,
fivethous int4,
tenthous int4,
- odd int4,
+ odd int4,
even int4,
stringu1 name,
stringu2 name,
unique2 int4,
two int4,
four int4,
- ten int4,
+ ten int4,
twenty int4,
hundred int4,
thousand int4,
- twothousand int4,
+ twothousand int4,
fivethous int4,
tenthous int4,
- odd int4,
+ odd int4,
even int4,
stringu1 name,
stringu2 name,
CREATE TABLE person (
name text,
- age int4,
+ age int4,
location point
);
) INHERITS (road);
CREATE TABLE real_city (
- pop int4,
+ pop int4,
cname text,
outline path
);
--
CREATE TABLE a_star (
class char,
- a int4
+ a int4
);
CREATE TABLE b_star (
- b text
+ b text
) INHERITS (a_star);
CREATE TABLE c_star (
- c name
+ c name
) INHERITS (a_star);
CREATE TABLE d_star (
- d float8
+ d float8
) INHERITS (b_star, c_star);
CREATE TABLE e_star (
- e int2
+ e int2
) INHERITS (c_star);
CREATE TABLE f_star (
- f polygon
+ f polygon
) INHERITS (e_star);
CREATE TABLE aggtest (
- a int2,
- b float4
+ a int2,
+ b float4
);
CREATE TABLE arrtest (
- a int2[],
- b int4[][][],
- c name[],
- d text[][],
- e float8[],
- f char(5)[],
- g varchar(5)[]
+ a int2[],
+ b int4[][][],
+ c name[],
+ d text[][],
+ e float8[],
+ f char(5)[],
+ g varchar(5)[]
);
CREATE TABLE hash_i4_heap (
-- the data set is too large for what it's worth
--
-- CREATE TABLE hash_ovfl_heap (
--- x int4,
--- y int4
+-- x int4,
+-- y int4
-- );
CREATE TABLE bt_i4_heap (
--
--- create.source
---
+-- CREATE_TYPE
--
CREATE TYPE widget (
--
--- VIRTUAL CLASS DEFINITIONS
+-- CREATE_VIEW
+-- Virtual class definitions
-- (this also tests the query rewrite system)
--
+--
+-- TRIGGERS
+--
create table pkeys (pkey1 int4 not null, pkey2 text not null);
create table fkeys (fkey1 int4, fkey2 text, fkey3 int);