pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feedWarning: PostgreSQL query failed
3+ messages / 3 participants
[nested] [flat]
* Warning: PostgreSQL query failed
@ 2003-09-22 10:44 shreedhar <shreedhar@lucidindia.net>
2003-09-22 11:16 ` Re: [GENERAL] Warning: PostgreSQL query failed Cornelia Boenigk <poppcorn@cornelia-boenigk.de>
2003-09-22 11:19 ` Re: Warning: PostgreSQL query failed Karsten Hilbert <Karsten.Hilbert@gmx.net>
0 siblings, 2 replies; 3+ messages in thread
From: shreedhar @ 2003-09-22 10:44 UTC (permalink / raw)
To: pgsql-admin; Postgre General <pgsql-general@postgresql.org>
Hi All,
I am framing Insert statements using PHP from the following information
107-Flash 5cartoons and Games\SMARTSOUND\SOUNDFILES | File Folder | 0 |
02/02/2001 09:33:31 PM
107-Flash 5cartoons and Games\SMARTSOUND\SOUNDFILES\KICKIN'BACK.SDS |
OpenOffice.org 5.0 Chart | 13803564 | 11/22/2000 01:15:54 PM
as below.
If I execute, I am getting a warning message in between as follows. But data
has been inserted into the table.
insert into tblFile (filename, filesize, filetype, modifieddate, parentid,
catalogid) values ('SOUNDFILES', 0 , ' File Folder ', '02/02/2001 09:33:31
PM', 69454, 61)
Warning: PostgreSQL query failed: ERROR: parser: parse error at or near
"BACK" at character 53 in /usr/local/apache/htdocs/info/diskcat/database.inc
on line 48
insert into tblFile (filename, filesize, filetype, modifieddate, parentid,
catalogid) values ('KICKIN\'BACK.SDS', 13803564 , ' OpenOffice.org 5.0 Chart
', '11/22/2000 01:15:54 PM', 69455, 61)
How can I handle this warning message.
Regards,
Sreedhar Bhaskararaju
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: [GENERAL] Warning: PostgreSQL query failed
2003-09-22 10:44 Warning: PostgreSQL query failed shreedhar <shreedhar@lucidindia.net>
@ 2003-09-22 11:16 ` Cornelia Boenigk <poppcorn@cornelia-boenigk.de>
1 sibling, 0 replies; 3+ messages in thread
From: Cornelia Boenigk @ 2003-09-22 11:16 UTC (permalink / raw)
To: shreedhar <shreedhar@lucidindia.net>; pgsql-admin; Postgre General <pgsql-general@postgresql.org>
Hi Sreedhar
Try it with
...
catalogid) values ('KICKIN''BACK.SDS', 13803564 , ' OpenOffice.org 5.0
Chart
...
Use a second ' to escape ' instead of a backslash.
Greetings
Conni
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: Warning: PostgreSQL query failed
2003-09-22 10:44 Warning: PostgreSQL query failed shreedhar <shreedhar@lucidindia.net>
@ 2003-09-22 11:19 ` Karsten Hilbert <Karsten.Hilbert@gmx.net>
1 sibling, 0 replies; 3+ messages in thread
From: Karsten Hilbert @ 2003-09-22 11:19 UTC (permalink / raw)
To: Postgre General <pgsql-general@postgresql.org>
> 107-Flash 5cartoons and Games\SMARTSOUND\SOUNDFILES\KICKIN'BACK.SDS |
^
This
will make the parser think the string ends here and assume
BACK to be intended to be part of valid SQL syntax. You need
to escape your input strings.
> insert into tblFile (filename, filesize, filetype, modifieddate, parentid,
> catalogid) values ('KICKIN\'BACK.SDS', 13803564 , ' OpenOffice.org 5.0 Chart
> ', '11/22/2000 01:15:54 PM', 69455, 61)
Hm, you do seem to do escaping. The number of slashes may not
be sufficient, though.
HTH,
Karsten
--
GPG key ID E4071346 @ wwwkeys.pgp.net
E167 67FD A291 2BEA 73BD 4537 78B9 A9F9 E407 1346
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2003-09-22 11:19 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2003-09-22 10:44 Warning: PostgreSQL query failed shreedhar <shreedhar@lucidindia.net>
2003-09-22 11:16 ` Cornelia Boenigk <poppcorn@cornelia-boenigk.de>
2003-09-22 11:19 ` Karsten Hilbert <Karsten.Hilbert@gmx.net>
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