Philip Warner <[EMAIL PROTECTED]> writes:
> 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.

Nope.  I can break that trivially, eg:

CREATE INDEX fooi ON foo (f1) WHERE upper(f1) < ' %%tablespace%%';

Not very probable, maybe, but you can't just do a blind sed-style
substitution.

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

                        regards, tom lane

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