Search Postgresql Archives

How use input parameter as path to COPY in function?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I am missing something basic. How can I use an input parameter as the destination path in a COPY statement in a function. The following fails with a syntax error at or near the parameter.

CREATE OR REPLACE FUNCTION  dvd.export_tables(IN export_path text)
RETURNS void
AS
$$
BEGIN
 copy dvd.genre to export_path
 with
 delimiter as E'\t'
 null as '';
END;
$$
 LANGUAGE 'plpgsql' VOLATILE




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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux