At 02:33 AM 20/08/2004, Bruce Momjian wrote:
> Could we 'set default tablespace xxx', then have pg_dump/restore use a
> 'create table' that does not refer to the tablespace?

That is what I was assuming.  You can't retroactively change the dump
file during restore so we would have some SET varaiable you would set
before doing the restore that said to handle create tablespace errors.

Actually I was thinking of a little more than a setting to ignore errors; we would need to:


   - modify pg_dump to store the tablespace name as a separate
     part of the TOC entry, NOT as part of the CREATE TABLE.
   - modify pg_restore to issue 'set default tablespace xxxx'
     before restoring a table OR, per Fabiens suggestion, issue
     an ALTER TABLE after the create.

Then table-space related errors will not stop a table being created.



----------------------------------------------------------------
Philip Warner | __---_____
Albatross Consulting Pty. Ltd. |----/ - \
(A.B.N. 75 008 659 498) | /(@) ______---_
Tel: (+61) 0500 83 82 81 | _________ \
Fax: (+61) 03 5330 3172 | ___________ |
Http://www.rhyme.com.au | / \|
| --________--
PGP key available upon request, | /
and from pgp.mit.edu:11371 |/



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