Re: SQL For smarties - Mailing list pgsql-sql

From Stephan Szabo
Subject Re: SQL For smarties
Date
Msg-id 20020220111526.A2906-100000@megazone23.bigpanda.com
Whole thread Raw
In response to Re: SQL For smarties  ("Graham Vickrage" <graham@digitalplanit.com>)
List pgsql-sql
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.



pgsql-sql by date:

Previous
From: Jeff Eckermann
Date:
Subject: Re: SQL For smarties
Next
From: "Josh Berkus"
Date:
Subject: Re: SQL For smarties