Обсуждение: zero-length string error ?
Hi ! Error Diagnostic Information ODBC Error Code = 08S01 (Communication link failure) Error while executing the query; ERROR: pg_atoi: zero-length string This is what I get now when trying to update thorugh a form, after power failure last night. From command line update goes ok. I'm running a cfml/web-application on linux RH7.3 and PG 7.3.3 Never had this before, what does it mean ? TIA, Aarni
Solved with a little help of my friends. Not related to power failure or redo, but no more single or double quoted comparisons with int-types in your sql-statement after 7.3.x ? BR, Aarni On Wednesday 11 June 2003 12:12, you wrote: > Hi ! > > Error Diagnostic Information > > ODBC Error Code = 08S01 (Communication link failure) > > Error while executing the query; ERROR: pg_atoi: zero-length string > > This is what I get now when trying to update thorugh a form, after power > failure last night. From command line update goes ok. > > I'm running a cfml/web-application on linux RH7.3 and PG 7.3.3 > > Never had this before, what does it mean ? > > TIA, > > Aarni > > > > ---------------------------(end of broadcast)--------------------------- > TIP 5: Have you checked our extensive FAQ? > > http://www.postgresql.org/docs/faqs/FAQ.html -- Aarni Ruuhimäki Megative Tmi KYMI.com Pääsintie 26 45100 Kouvola info@kymi.com / aarni.ruuhimaki@kymi.com 05 - 3755 035 / 050 - 4910 037 ------------------------------- Linux RedHat 7.3. / KDE 3.0 -------------------------------
On Wed, Jun 11, 2003 at 12:54:32 +0300, Aarni <aarni.ruuhimaki@kymi.com> wrote: > Solved with a little help of my friends. > > Not related to power failure or redo, but no more single or double quoted > comparisons with int-types in your sql-statement after 7.3.x ? Double quotes are used for quoting identifiers not data. The error message you got is one that you get when you use an empty string as the value for a number. Older (7.2.x I think) versions of Postgres used to treat these as a representation for 0. Now you get an error.
Hi, Yes, that's what I meant basically ( my bad phrasing ), the problem was like this: In 7.2.x UPDATE table SET to_class = '#to_class#' WHERE ... to_class being smallint type and sometimes empty or 0 and it worked ok, with a little check in which class the actual given ( if given ) form.turnover belongs to. For 7.3.3. this was fixed with SET to_class = <cfif to_class EQ "">NULL<cfelse>#to_class#</cfif> WHERE ... i.e. as NULL or if it has a value, without single quotes. BR, Aarni On Wednesday 11 June 2003 15:11, you wrote: > On Wed, Jun 11, 2003 at 12:54:32 +0300, > > Aarni <aarni.ruuhimaki@kymi.com> wrote: > > Solved with a little help of my friends. > > > > Not related to power failure or redo, but no more single or double quoted > > comparisons with int-types in your sql-statement after 7.3.x ? > > Double quotes are used for quoting identifiers not data. > > The error message you got is one that you get when you use an empty > string as the value for a number. Older (7.2.x I think) versions > of Postgres used to treat these as a representation for 0. Now you > get an error. > > ---------------------------(end of broadcast)--------------------------- > TIP 2: you can get off all lists at once with the unregister command > (send "unregister YourEmailAddressHere" to majordomo@postgresql.org)