"copy from" in "create function"

From: Gifford Hesketh <gifford(dot)hesketh(at)gmail(dot)com>
To: pgsql-sql(at)postgresql(dot)org
Subject: "copy from" in "create function"
Date: 2004-10-20 22:03:22
Message-ID: 4f6940a604102015034e5560bb@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Am I forgetting some limitation ? I get "ERROR: syntax error at or
near "$1" at character 22" with this:

CREATE FUNCTION public.fn_b_import( text ) RETURNS void AS
'
COPY b_import FROM $1 ;
'
LANGUAGE 'sql' STABLE;

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Iain 2004-10-21 01:31:00 Re: Reuse previously calculated column in sql query?
Previous Message Stephan Szabo 2004-10-20 16:56:03 Re: time of constraint checking