Re: working with schema

Поиск
Список
Период
Сортировка
От Christoph Haller
Тема Re: working with schema
Дата
Msg-id 200405101049.MAA13883@rodos
обсуждение исходный текст
Ответ на working with schema  ("William Anthony Lim" <wei.liang@eudoramail.com>)
Список pgsql-sql
> 
> Hi all,
> 
> I'm just experimenting with schema usage. I'm going to use it as a fake 'multi-database' system. Is Postgresql
supportcoding schema name using string variable so I can pass it with parameter? I'm give u an example:
 
> 
> I have schema: D200401,D200402.D200403,D200404, etc.
> 
> I've set my user just like the schema name, so who login with D200401 will be using D200401 schema. When someone
usingD200401 schema, they sometime want to access another schema, so in my thought I can use variable like this:
 
> 
> sPointer='D200403'
> 
> select * from sPointer.myTable -- Question: How to write it to work properly?
> 
> Thanks
> 
> 
> William
> 
> 
SET search_path to D200401 ;
SET search_path to D200402 ; 
... 
should do the job. 

Regards, Christoph 



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

Предыдущее
От: "William Anthony Lim"
Дата:
Сообщение: working with schema
Следующее
От: Theodore Petrosky
Дата:
Сообщение: Re: not really SQL but I need info on BLOBs