*** ./expected/tablespace.out Fri Sep 10 13:42:08 2004 --- ./results/tablespace.out Fri Sep 10 13:53:22 2004 *************** *** 1,34 **** -- create a tablespace we can use CREATE TABLESPACE testspace LOCATION '/usr/src/postgresql/pgsql/src/test/regress/testtablespace'; -- create a schema in the tablespace CREATE SCHEMA testschema TABLESPACE testspace; -- sanity check SELECT nspname, spcname FROM pg_catalog.pg_tablespace t, pg_catalog.pg_namespace n where n.nsptablespace = t.oid and n.nspname = 'testschema'; nspname | spcname ! ------------+----------- ! testschema | testspace ! (1 row) -- try a table CREATE TABLE testschema.foo (i int); SELECT relname, spcname FROM pg_catalog.pg_tablespace t, pg_catalog.pg_class c where c.reltablespace = t.oid AND c.relname = 'foo'; relname | spcname ! ---------+----------- ! foo | testspace ! (1 row) INSERT INTO testschema.foo VALUES(1); INSERT INTO testschema.foo VALUES(2); -- index CREATE INDEX foo_idx on testschema.foo(i); SELECT relname, spcname FROM pg_catalog.pg_tablespace t, pg_catalog.pg_class c where c.reltablespace = t.oid AND c.relname = 'foo_idx'; relname | spcname ! ---------+----------- ! foo_idx | testspace ! (1 row) -- Will fail with bad path CREATE TABLESPACE badspace LOCATION '/no/such/location'; --- 1,37 ---- -- create a tablespace we can use CREATE TABLESPACE testspace LOCATION '/usr/src/postgresql/pgsql/src/test/regress/testtablespace'; + ERROR: could not create symbolic link "/usr/src/postgresql/pgsql/src/test/regress/./tmp_check/data/pg_tblspc/155118": No error -- create a schema in the tablespace CREATE SCHEMA testschema TABLESPACE testspace; + ERROR: tablespace "testspace" does not exist -- sanity check SELECT nspname, spcname FROM pg_catalog.pg_tablespace t, pg_catalog.pg_namespace n where n.nsptablespace = t.oid and n.nspname = 'testschema'; nspname | spcname ! ---------+--------- ! (0 rows) -- try a table CREATE TABLE testschema.foo (i int); + ERROR: schema "testschema" does not exist SELECT relname, spcname FROM pg_catalog.pg_tablespace t, pg_catalog.pg_class c where c.reltablespace = t.oid AND c.relname = 'foo'; relname | spcname ! ---------+--------- ! (0 rows) INSERT INTO testschema.foo VALUES(1); + ERROR: schema "testschema" does not exist INSERT INTO testschema.foo VALUES(2); + ERROR: schema "testschema" does not exist -- index CREATE INDEX foo_idx on testschema.foo(i); + ERROR: schema "testschema" does not exist SELECT relname, spcname FROM pg_catalog.pg_tablespace t, pg_catalog.pg_class c where c.reltablespace = t.oid AND c.relname = 'foo_idx'; relname | spcname ! ---------+--------- ! (0 rows) -- Will fail with bad path CREATE TABLESPACE badspace LOCATION '/no/such/location'; *************** *** 38,45 **** ERROR: tablespace "nosuchspace" does not exist -- Fail, not empty DROP TABLESPACE testspace; ! ERROR: tablespace "testspace" is not empty DROP SCHEMA testschema CASCADE; ! NOTICE: drop cascades to table testschema.foo -- Should succeed DROP TABLESPACE testspace; --- 41,49 ---- ERROR: tablespace "nosuchspace" does not exist -- Fail, not empty DROP TABLESPACE testspace; ! ERROR: tablespace "testspace" does not exist DROP SCHEMA testschema CASCADE; ! ERROR: schema "testschema" does not exist -- Should succeed DROP TABLESPACE testspace; + ERROR: tablespace "testspace" does not exist ======================================================================