pg.ddx.io pgsql-odbc@postgresql.org mailing list archive
help / color / mirror / Atom feedInsert path fails
3+ messages / 3 participants
[nested] [flat]
* Insert path fails
@ 2003-01-09 21:43 Steven Sluter <loverman@sidehack.gweep.net>
2003-01-12 13:33 ` Re: Insert path fails Hiroshi Inoue <Inoue@tpf.co.jp>
2003-01-12 17:36 ` Re: Insert path fails Jeff Eckermann <jeff_eckermann@yahoo.com>
0 siblings, 2 replies; 3+ messages in thread
From: Steven Sluter @ 2003-01-09 21:43 UTC (permalink / raw)
To: pgsql-odbc
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
Here is the relevent stuff from the psqlodbc file:
conn=215355400, query='Insert Into
Images(OrderID,Roll,Frame,ImageType,Path,Category,Sequence,Gamma,Width,
Length,Filetype,PreviewWidth,PreviewLength,CropX,CropY,CropWidth,CropLength)
Values('me','control tiffs','50_gray',0,'\\RAID\Raid\control tiffs\50_gray.tif'
,'All',0,1.0,2000,2500,'TIFF',400,500,50.0,50.0,100.0,100.0)'
Why does this insert the wrong value into the database?
Thanks
-Steve
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: Insert path fails
2003-01-09 21:43 Insert path fails Steven Sluter <loverman@sidehack.gweep.net>
@ 2003-01-12 13:33 ` Hiroshi Inoue <Inoue@tpf.co.jp>
1 sibling, 0 replies; 3+ messages in thread
From: Hiroshi Inoue @ 2003-01-12 13:33 UTC (permalink / raw)
To: Steven Sluter <loverman@sidehack.gweep.net>; +Cc: pgsql-odbc
> -----Original Message-----
> From: Steven Sluter
>
> 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
It's a spec of PostgreSQL.
The ODBC driver passes the query as is.
regards,
Hiroshi Inoue
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: Insert path fails
2003-01-09 21:43 Insert path fails Steven Sluter <loverman@sidehack.gweep.net>
@ 2003-01-12 17:36 ` Jeff Eckermann <jeff_eckermann@yahoo.com>
1 sibling, 0 replies; 3+ messages in thread
From: Jeff Eckermann @ 2003-01-12 17:36 UTC (permalink / raw)
To: Steven Sluter <loverman@sidehack.gweep.net>; pgsql-odbc
--- 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
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2003-01-12 17:36 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2003-01-09 21:43 Insert path fails Steven Sluter <loverman@sidehack.gweep.net>
2003-01-12 13:33 ` Hiroshi Inoue <Inoue@tpf.co.jp>
2003-01-12 17:36 ` Jeff Eckermann <jeff_eckermann@yahoo.com>
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