Re: Hash problem - Mailing list pgsql-general

From Ian Barwick
Subject Re: Hash problem
Date
Msg-id 1d581afe05031200404b86ef26@mail.gmail.com
Whole thread Raw
In response to Hash problem  (Madison Kelly <linux@alteeve.com>)
List pgsql-general
On Sat, 12 Mar 2005 02:18:55 -0500, Madison Kelly <linux@alteeve.com> wrote:
> Hi all,
>
>    I am back to trying to get the forum software called 'Ikonboard'
> working under postgres (it's advertised as being supported but the
> developers confirmed their pgSQL person left a while back).
>
>    At the moment I am (well, the program is) getting trying to perform
> this query:
>
> SELECT * FROM tf_forum_posts WHERE FORUM_ID = HASH(0x868d4e0) AND
> TOPIC_ID = AND QUEUED = '0' ORDER BY POST_DATE LIMIT 2;
>
> which throws this error:
>
> ERROR:  parser: parse error at or near "x868d4e0" at character 53
>
>    Most of the problems so far have stemmed from changes from (I think)
> pgSQL 7.2 (the last version the program was actively tested on) to 7.4.
> I have yet to test it under 8.0. Does this seem like an obvious syntax
> error in the newer versions of pgSQL? If so, what is a valid substitution.

This is a syntax "error" in Perl (assuming Ikonboard is a Perl app; it's hard to
see from their homepage) of the kind you get when interpolating a hash
reference where a scalar value is expected, e.g.:

  perl -e '%a = (); print \%a;'

You'll need to find the offending section of the code and work out
what's gone wrong; also "TOPIC_ID" seems to be missing a value.

Possibly - and this is speculation - a preceding query has thrown
an error which the app isn't dealing with (e.g. due to some change in
PostgreSQL between 7.2 and 7.4, possibly a "LIMIT x,y" type clause
or an attempt to insert a value which is longer than the database field
etc.) and this is causing the insertion of invalid values in the
above statement.

Ian Barwick

pgsql-general by date:

Previous
From: Benjamin Smith
Date:
Subject: Checking for schedule conflicts
Next
From: Ragnar Hafstað
Date:
Subject: Re: [JDBC] MS Access to PostgreSQL