From: Stephan Szabo <sszabo@megazone23.bigpanda.com>
To: Graham Vickrage <graham@digitalplanit.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: SQL For smarties
Date: Wed, 20 Feb 2002 11:15:51 -0800 (PST)
Message-ID: <20020220111526.A2906-100000@megazone23.bigpanda.com> (raw)
In-Reply-To: <NDBBJABDILOPAOOMFJHOGEAMDEAA.graham@digitalplanit.com>
On Wed, 20 Feb 2002, Graham Vickrage wrote:
> I am trying to create tables from within a funtion i.e.
>
> create function _tree_create(text) retuns int as '
> begin;
> create table $1_tree (....);
> return 1;
> end;
> ...
>
> select _tree_create('item');
>
> An error message refering to $1 gets thrown up. Is this not possible to do
> or is there another way of doing it?
You'll probably need to generate the query string you want to run and
use execute.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: sszabo@megazone23.bigpanda.com, graham@digitalplanit.com
Subject: Re: SQL For smarties
In-Reply-To: <20020220111526.A2906-100000@megazone23.bigpanda.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox