On Wed, Feb 16, 2011 at 03:59:13PM -0800, carl clemens wrote:
- Hi Hackers,
-
- After reviewing docs and searching web
- cannot find out how to determine the default tablespace
- of a user?
-
- Like:
-
- select spcname from blab where roloid = 1111;
-
- Is this possible?
-
- Thank you for your time.
-
It doesn't appear to me that default tablespaces are assigned to a user, they're
assigned to a database.
A user can set the variable default_tablespace in their session to over-ride the
database default, but that wouldn't be stored anywhere in the database (it's a client
variable).
you can find the OID for the default tablespace for a specific database in pg_database.
more info:
http://www.postgresql.org/docs/9.0/static/runtime-config-client.html#GUC-DEFAULT-TABLESPACE
Dave