Create Schema functionality question

From: Seamus Thomas Carroll <carrolls(at)cpsc(dot)ucalgary(dot)ca>
To: pgsql-general(at)postgresql(dot)org
Subject: Create Schema functionality question
Date: 2004-02-24 01:37:39
Message-ID: Pine.LNX.4.44.0402231831320.1660-100000@ict715b
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,

I am trying to create a schema where the schema name has been defined in
another table. My sql looks like:
create schema (select agent_schema from agents.agents where agent_id =
(select(last_value) from agents.agents_seq));

The select statement works correctly on its own but when added to
"create schema" I get the following error:
ERROR: syntax error at or near "(" at character 15

Is there any possible way to create a schema without having
to hard code the name?

Seamus

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2004-02-24 05:50:31 Re: Found this in the server log on MAC OSX
Previous Message Sean Shanny 2004-02-24 00:57:28 Re: Found this in the server log on MAC OSX