Hi,

On 10 October 2011 21:35, József Kurucz <jozsef.kur...@invitel.hu> wrote:
> ERROR:  syntax error at or near "$1"
> LINE 1: create table  $1  ( )
>                      ^
> QUERY:  create table  $1  ( )
> CONTEXT:  SQL statement in PL/PgSQL function "check_table" near line 22

I think you have to use "execute":

execute 'create table ' || tblname || ' ()';

http://www.postgresql.org/docs/current/static/plpgsql-statements.html#PLPGSQL-STATEMENTS-EXECUTING-DYN

-- 
Ondrej Ivanic
(ondrej.iva...@gmail.com)

-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

Reply via email to