X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 70B04D1E5EA for ; Mon, 10 May 2004 05:11:08 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 13539-02 for ; Mon, 10 May 2004 05:10:50 -0300 (ADT) Received: from whowhere.com (in02-fes1.whowhere.com [209.202.220.218]) by svr1.postgresql.org (Postfix) with SMTP id 0A571D1B436 for ; Mon, 10 May 2004 05:10:47 -0300 (ADT) Received: from Unknown/Local ([?.?.?.?]) by whowhere.com; Mon, 10 May 2004 08:10:31 -0000 To: pgsql-sql@postgresql.org Date: Mon, 10 May 2004 01:10:31 -0700 From: "William Anthony Lim" Message-ID: Mime-Version: 1.0 X-Sent-Mail: off Reply-To: wei.liang@eudoramail.com X-Expiredinmiddle: true X-Mailer: MailCity Service X-Priority: 3 Subject: working with schema X-Sender-Ip: 202.155.52.32 Organization: Lycos Mail (http://www.mail.eudoramail.com) Content-Type: text/plain; charset=us-ascii Content-Language: en Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at postgresql.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200405/83 X-Sequence-Number: 17797 Hi all, I'm just experimenting with schema usage. I'm going to use it as a fake 'multi-database' system. Is Postgresql support coding 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 using D200401 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 Need a new email address that people can remember Check out the new EudoraMail at http://www.eudoramail.com