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.20041020105715.044ca970@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 04:20 AM 20/10/2004, Tom Lane wrote:
>Nope.  I can break that trivially, eg:

Thats why in my first message I mentioned escaping and unescaping all '%' 
in the deinition.


>There's also the nontrivial matter of how pg_dump would decide where to
>insert the %%tablespace%% string into the CREATE INDEX command in the
>first place.

I'd vote against parsing, and add a parameter to get_indexdef.


>If we're going to add code to parse CREATE INDEX and
>insert the tablespace in the correct place, meseems it'd be better to
>insert it on the pg_restore side.

But if we have to parse, I'd add it in pg_dump so all items that are 
relevant can be dumped with '%%tablespace%%'. pg_dump still constructs 
CREATE TABLE statements, so that is the natural place to add the tablespace 
marker and avoid parsing for tables.




----------------------------------------------------------------
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: "Simon Riggs"
Date:
Subject: Re: plans for bitmap indexes?
Next
From: Sailesh Krishnamurthy
Date:
Subject: Re: plans for bitmap indexes?