Stored Procedure: Copy table from; path = text variable

From: Charles Pare <debile_trash(at)hotmail(dot)com>
To: <pgsql-general(at)postgresql(dot)org>
Subject: Stored Procedure: Copy table from; path = text variable
Date: 2007-07-03 18:49:48
Message-ID: BAY124-W186331C42248ED7DADA894EF0C0@phx.gbl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi, in a stored procedure, if I do COPY table FROM 'mypath' DELIMITERS '\t'; it works but if my path is a text variable which contain my path, i.e.COPY table FROM mytextvar DELIMITERS '\t'; it doesn't work, I get ERROR: syntax error at or near "$1"SQL state: 42601Context: SQL statement in PL/PgSQL function "parseinsert" near line 15Is there any workaround? I want to create a temporary table, copy from and parse the table, all with dynamic path depending of how the function is called.Thank'sCharles
_________________________________________________________________
Explore the seven wonders of the world
http://search.msn.com/results.aspx?q=7+wonders+world&mkt=en-US&form=QBRE

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Richard Huxton 2007-07-03 19:01:03 Re: Stored Procedure: Copy table from; path = text variable
Previous Message Emi Lu 2007-07-03 18:27:24 Date for a week day of a month