From: | Aarni <aarni(dot)ruuhimaki(at)kymi(dot)com> |
---|---|
To: | Bruno Wolff III <bruno(at)wolff(dot)to> |
Cc: | pgsql-novice(at)postgresql(dot)org |
Subject: | Re: zero-length string error ? |
Date: | 2003-06-11 13:19:19 |
Message-ID: | 200306111619.19449.aarni.ruuhimaki@kymi.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-novice |
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(dot)ruuhimaki(at)kymi(dot)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(at)postgresql(dot)org)
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2003-06-11 13:21:57 | Re: Strange error in 7.3.1 |
Previous Message | Bruno Wolff III | 2003-06-11 12:11:24 | Re: zero-length string error ? |