Am I entering a world of pain...

From: Aled Morris <aled(at)tesco(dot)net>
To: pgsql-novice(at)postgresql(dot)org
Subject: Am I entering a world of pain...
Date: 2003-08-12 21:53:46
Message-ID: 200308122253.46209.aled@tesco.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

...by trying to port a SQL Server application to Postgresql?

I am unable to get a simple function to work. Any ideas as to what is wrong
with it?

create or replace function droptable (varchar(255)) returns void as '
begin
drop table $1;
return;
end;
' language 'plpgsql';

This is what happens when I execute the function:

select droptable('asdfadsfasfd');
WARNING: Error occurred while executing PL/pgSQL function droptable
WARNING: line 2 at SQL statement
ERROR: parser: parse error at or near "$1" at character 13

Regards

AM

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Stephan Szabo 2003-08-12 22:52:49 Re: Am I entering a world of pain...
Previous Message Bradley J. Bartram 2003-08-12 20:27:05 Re: Maximum Number of Function Arguments