Re: Using ALTER TABLESPACE in pg_dump - Mailing list pgsql-hackers

From Philip Warner
Subject Re: Using ALTER TABLESPACE in pg_dump
Date
Msg-id 6.1.2.0.0.20041020040220.056abd98@203.8.195.10
Whole thread Raw
In response to Re: Using ALTER TABLESPACE in pg_dump  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Using ALTER TABLESPACE in pg_dump
List pgsql-hackers
At 03:25 AM 20/10/2004, Tom Lane wrote:
>Maybe there's something I don't understand.  How are you expecting
>pg_restore to control whether it outputs the command with a TABLESPACE
>clause embedded or not, if pg_dump has already built the command string
>that way?

This will only work if we modify the dump format (a new version) of 
dump/restore; the TOC entry for a table would have:

DEFINITION: CREATE TABLE fred ... %%tablespace%% ...
TABLESPACE: ' TABLESPACE t'

pg_restore would read these, and use the settings from the command line to 
either substitute an empty string or the TABLESPACE text for %%tablespace%% 
in the DEFINTION.

Same would apply for indexes etc.




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



pgsql-hackers by date:

Previous
From: "Joshua D. Drake"
Date:
Subject: Re: Time off
Next
From: Tom Lane
Date:
Subject: Re: Using ALTER TABLESPACE in pg_dump