Re: pg_get_indexdef excludes tablespace info

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Steven Flatt" <steven(dot)flatt(at)gmail(dot)com>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: pg_get_indexdef excludes tablespace info
Date: 2007-11-07 19:14:52
Message-ID: 28037.1194462892@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

"Steven Flatt" <steven(dot)flatt(at)gmail(dot)com> writes:
> Would this be considered a bug or is the tablespace info excluded for
> a particular reason?

It's intentional: pg_dump doesn't want it there. In a pg_dump script
we want to do

set default_tablespace = foo_space;

create index foo_idx on foo using btree (a);

because that way the creation command doesn't fail completely if there's
no such tablespace in the target installation.

We could maybe teach pg_dump to strip the clause out of
pg_get_indexdef's output, but that seemed complicated and fragile.

regards, tom lane

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Falk Hueffner 2007-11-07 19:19:55 Re: Test suite fails on alpha architecture
Previous Message Martin Pitt 2007-11-07 19:12:40 Re: Test suite fails on alpha architecture