Re: Copy function syntax on 8.1

From: "Mike G(dot)" <mike(at)thegodshalls(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: Copy function syntax on 8.1
Date: 2005-08-30 17:25:22
Message-ID: 20050830172522.GA10003@localhost.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

On the non windows platforms you can issue the copy statement and the file path syntax is exactly the same as if you were changing directories in a shell. No special escaping or syntax is needed.

It would be nice if the same could be done for those forced to use windows.

In this case one does not really have a choice on whether or not they want to use special backslash processing.

I have no problem using the E'' if it will be supported well into the future. It just is not as convenient.

Mike

On Tue, Aug 30, 2005 at 12:39:48PM -0400, Tom Lane wrote:
> "Mike G." <mike(at)thegodshalls(dot)com> writes:
> > In testing 8.1 I turned on the escape_string_warning. Now when I issue a COPY FROM / TO 'C:\\test' I am getting the "non standard.." warning since file paths in Windows use the \ character. I can clear the warning by changing the syntax to E'C:\\test'.
>
> > Is their a way to properly escape the \ without using E or will the COPY function have to modified internally to not return a warning if a \ is passed in the file path?
>
> Why do you think COPY should be modified? This is exactly the case that
> the warning is intended to warn about.
>
> regards, tom lane
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo(at)postgresql(dot)org so that your
> message can get through to the mailing list cleanly

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message operationsengineer1 2005-08-30 17:32:34 New PGSQL and Linux Setup on Old Box
Previous Message Tom Lane 2005-08-30 16:39:48 Re: Copy function syntax on 8.1