pg.ddx.io  pgsql-odbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Jeff Eckermann <jeff_eckermann@yahoo.com>
To: Steven Sluter <loverman@sidehack.gweep.net>
To: pgsql-odbc@postgresql.org
Subject: Re: Insert path fails
Date: Sun, 12 Jan 2003 09:36:47 -0800 (PST)
Message-ID: <20030112173647.62594.qmail@web20809.mail.yahoo.com> (raw)
In-Reply-To: <20030109163411.W25392@sidehack.sat.gweep.net>

--- Steven Sluter <loverman@sidehack.gweep.net> wrote:
> Hello-
> 
> I am running PostgreSQL 7.2.1 on
> i386-portbld-freebsd4.6.  I'm connecting
> from a program on windows nt 4.0, using the
> 7.02.00.05 ver. of PGSQL-ODBC
> drivers.
> 
> When I try to insert a windows UNC path:
> 
> \\RAID\Raid\control tiffs\50_gray.tif
> 
> 
> into the database, I end up with this:
> 
> \RAIDRaidcontrol tiffs(_gray.tif

The backslash is an escape character in PostgreSQL,
and is stripped off at parsing time.  Your
alternatives are:
* Double every backslash you want to preserve, i.e.
\\\\RAID\\Raid\\control tiffs\\50_gray.tif
* Add extra quotes (a mess, don't even try it)
* Use the quote_literal() function, which causes
PostgreSQL to accept the text as-is: e.g. 
INSERT INTO <table> (<field>) VALUES
quote_literal('text goes here')

__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com



view thread (3+ messages)

Message-ID: <20030112173647.62594.qmail@web20809.mail.yahoo.com>
Permalink:  ../20030112173647.62594.qmail@web20809.mail.yahoo.com/
Also on:    postgresql.org/message-id/20030112173647.62594.qmail@web20809.mail.yahoo.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-odbc@postgresql.org
  Cc: jeff_eckermann@yahoo.com, loverman@sidehack.gweep.net
  Subject: Re: Insert path fails
  In-Reply-To: <20030112173647.62594.qmail@web20809.mail.yahoo.com>
  References: <20030109163411.W25392@sidehack.sat.gweep.net> <20030112173647.62594.qmail@web20809.mail.yahoo.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox