Re: Tablespace permissions issue - Mailing list pgsql-hackers

From Gavin Sherry
Subject Re: Tablespace permissions issue
Date
Msg-id Pine.LNX.4.58.0406290303080.24086@linuxworld.com.au
Whole thread Raw
In response to Re: Tablespace permissions issue  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Mon, 28 Jun 2004, Tom Lane wrote:

> I don't see any reasonable way for CREATE DATABASE to avoid this
> problem, since it can't necessarily look inside the source database.
> My thought is that the cleanest fix is to never allow reltablespace
> (or nsptablespace) to explicitly specify the database's default
> tablespace; that is, if you write
>     CREATE TABLE ... TABLESPACE x
> and "x" is the database-level default, we should silently store zero
> instead of x's OID into reltablespace.  The table would get created
> in the same place either way, but the implications for future cloning
> or dump/reload of the database would be different.  The table would go
> to the new database default tablespace, whatever that is, instead of
> staying in "x".
>
> Thoughts?

I don't see any other way around it than this (other than looking at the
template database's data, but that wont happen for 7.5).

Thanks,

Gavin


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Tablespace permissions issue
Next
From: Darko Prenosil
Date:
Subject: improper call to spi_printtup ???