Create Schema functionality question - Mailing list pgsql-general

From Seamus Thomas Carroll
Subject Create Schema functionality question
Date
Msg-id Pine.LNX.4.44.0402231831320.1660-100000@ict715b
Whole thread Raw
Responses Re: Create Schema functionality question
List 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


pgsql-general by date:

Previous
From: Sean Shanny
Date:
Subject: Re: Found this in the server log on MAC OSX
Next
From: Tom Lane
Date:
Subject: Re: Found this in the server log on MAC OSX