Re: COPY with a variable path

From: Raymond O'Donnell <rod(at)iol(dot)ie>
To: Bill Todd <pg(at)dbginc(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: COPY with a variable path
Date: 2008-11-27 21:07:04
Message-ID: 492F0BF8.6060901@iol.ie
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 27/11/2008 20:52, Bill Todd wrote:

> Substituting the input parameter for the literal path does not work and
> neither does using PREPARE/EXECUTE. How can I pass the file path as a
> parameter?

You could write a pl/pgsql function which constructs the query as a
string and then runs it with EXECUTE.

Ray.

------------------------------------------------------------------
Raymond O'Donnell, Director of Music, Galway Cathedral, Ireland
rod(at)iol(dot)ie
Galway Cathedral Recitals: http://www.galwaycathedral.org/recitals
------------------------------------------------------------------

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2008-11-27 21:32:25 Re: Expected password response, got message type 88
Previous Message Bill Todd 2008-11-27 20:52:40 COPY with a variable path