That worked. Thank you Adrian
-Original Message-
From: Adrian Klaver [mailto:adrian.kla...@gmail.com]
Sent: Thursday, February 23, 2012 9:58 AM
To: pgsql-general@postgresql.org
Cc: Carlos Oliva
Subject: Re: [GENERAL] Dynamic File Name for COPY TO in Stored Procedure
On Thursday
On Thursday, February 23, 2012 6:42:53 am Carlos Oliva wrote:
> Hi,
> What would it be the correct format for using a variable in a stored
> procedure that uses COPY TO?
>
> I have the current stored procedure:
> CREATE FUNCTION Table_To_File(text) RETURNS void AS $delimeter$
>COPY (SELECT * F
Hi,
What would it be the correct format for using a variable in a stored
procedure that uses COPY TO?
I have the current stored procedure:
CREATE FUNCTION Table_To_File(text) RETURNS void AS $delimeter$
COPY (SELECT * FROM table_to_xml('table', true, false, '')) TO '$1'
WITH CSV QUOTE ' ';
$de