From: | Bill Todd <pg(at)dbginc(dot)com> |
---|---|
To: | rod(at)iol(dot)ie |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: COPY with a variable path |
Date: | 2008-11-27 23:23:31 |
Message-ID: | 492F2BF3.7030308@dbginc.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Raymond O'Donnell wrote:
> 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
> ------------------------------------------------------------------
>
>
>
I tried your suggestion and it worked! Thanks.
Bill
From | Date | Subject | |
---|---|---|---|
Next Message | Raymond O'Donnell | 2008-11-27 23:25:15 | Re: COPY with a variable path |
Previous Message | Chris Browne | 2008-11-27 23:10:37 | Re: Using postgres.log file for replication |