Bruce Momjian schrieb:
Fabien COELHO wrote:
Dear hackers,
I'm happy to do the pg_dump changes, assuming Tom gets the SET stuff sorted
out.

ISTM that the tablespace handling or ignoring in pg_dump/pg_restore is still an open issue in current CVS head... waiting for a proper implementation after the brain-storming on what seemed to be the consensus, that is to output a separate

        SET DEFAULT TABLESPACE somewhere;

before object creations in the dump/restore command flow.

I've noticed that the item does not seem to appear in Bruce's list, thus
I'm afraid it might be lost for 8.0 where I think it belongs... hence this
little reminder.

It isn't on the open items list because it isn't a _must_ fix for 8.0, though it is still in my mailbox. As I remember it is to allow objects to be created when the schema doesn't exist, and for creating more portable pg_dump CREATE statements. If someone wants to fix that, they have to get it working and get agreement to put it in during beta.

It is on the TODO list (the missing schemas part).

But the regression test fails: (the only failing test against cvs HEAD) This is not only a pg_dump/pg_restore issue, or?

-- Will fail with bad path
CREATE TABLESPACE badspace LOCATION '/no/such/location';
ERROR: could not set permissions on directory "/no/such/location": No such file or directory
-- No such tablespace
CREATE TABLE bar (i int) TABLESPACE nosuchspace;
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;


=>

***************
*** 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

======================================================================
--
Reini Urban
http://xarch.tu-graz.ac.at/home/rurban/

---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
     joining column's datatypes do not match

Reply via email to