Re: default_tablespace

Поиск
Список
Период
Сортировка
От David Kerr
Тема Re: default_tablespace
Дата
Msg-id 20110217200156.GB24065@mr-paradox.net
обсуждение исходный текст
Ответ на Re: default_tablespace  (Florian Pflug <fgp@phlo.org>)
Список pgsql-hackers
On Thu, Feb 17, 2011 at 08:55:55PM +0100, Florian Pflug wrote:
- On Feb17, 2011, at 18:32 , David Kerr wrote:
- > On Wed, Feb 16, 2011 at 03:59:13PM -0800, carl clemens wrote:
- > - After reviewing docs and searching web
- > - cannot find out how to determine the default tablespace
- > - of a user?
- > 
- > 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, however, do ALTER USER <user> SET default_tablespace=<whatever>, which will
- cause default_tablespace to be set automatically upon login for that user.
- 
- I don't know of the top of my head how we store that in the system catalogs, though.
- You'll have to check the documentation to find that out...
- 
- best regards,
- Florian Pflug 

oh, you're right. my mistake.

and it looks like it's stored in useconfig in pg_user.

select * from pg_user where usename = 'david.kerr'; usename   | usesysid | usecreatedb | usesuper | usecatupd |  passwd
| valuntil |         useconfig         
 

------------+----------+-------------+----------+-----------+----------+----------+---------------------------david.kerr
|   16482 | f           | t        | t         | ******** |          | {default_tablespace=test}
 


Dave


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Oleg Bartunov
Дата:
Сообщение: Re: tsearch Parser Hacking
Следующее
От: Josh Berkus
Дата:
Сообщение: Re: Add support for logging the current role