Re: working with schema - Mailing list pgsql-sql

From William Anthony Lim
Subject Re: working with schema
Date
Msg-id NLLCBABPBINFLBAA@whowhere.com
Whole thread Raw
In response to working with schema  ("William Anthony Lim" <wei.liang@eudoramail.com>)
Responses Re: working with schema
List pgsql-sql
Christoph,

First, is it safe for multi user? I mean maybe first user need working with D200402, second one need with D200403, if I
dothis in first user connection:
 

SET search_path to D200402 ; 

does it affect to the second user search path?

Second, I want it dinamic. So, if I want to using D200402, I just need to pass 'D200402' string in the argument of the
function.Got my point?
 

Thanks anyway,

William

>> 
>> 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 
>
>
>---------------------------(end of broadcast)---------------------------
>TIP 4: Don't 'kill -9' the postmaster
>



Need a new email address that people can remember
Check out the new EudoraMail at
http://www.eudoramail.com


pgsql-sql by date:

Previous
From: Gary Stainburn
Date:
Subject: view problem - too many rows out
Next
From: Mats Sjöberg
Date:
Subject: How do i extract a certain bit from a bigint column