Am I entering a world of pain...

Поиск
Список
Период
Сортировка
От Aled Morris
Тема Am I entering a world of pain...
Дата
Msg-id 200308122253.46209.aled@tesco.net
обсуждение исходный текст
Ответы Re: Am I entering a world of pain...  (Stephan Szabo <sszabo@megazone.bigpanda.com>)
Re: Am I entering a world of pain...  (Tom Lane <tgl@sss.pgh.pa.us>)
Список 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

В списке pgsql-novice по дате отправления:

Предыдущее
От: "Bradley J. Bartram"
Дата:
Сообщение: Re: Maximum Number of Function Arguments
Следующее
От: Stephan Szabo
Дата:
Сообщение: Re: Am I entering a world of pain...