Re: Functions just dont want to work! [hard]

From: Joel Burton <joel(at)joelburton(dot)com>
To: "Andrew J(dot) Kopciuch" <akopciuch(at)bddf(dot)ca>
Cc: Joel Burton <joel(at)joelburton(dot)com>, Yonatan Ben-Nes <da(at)canaan(dot)co(dot)il>, pgsql-general(at)postgresql(dot)org
Subject: Re: Functions just dont want to work! [hard]
Date: 2002-12-04 20:33:44
Message-ID: 20021204203344.GB19111@temp.joelburton.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wed, Dec 04, 2002 at 01:25:43PM -0700, Andrew J. Kopciuch wrote:
> > Problem is that 24 is not an int2 -- it's an int4 (generic int type).
> > For example:
> >
>
> Yes it is ... int2 is a two byte integer, meaning it has a range from
> -32768 to +32767. Unless I totally mistaken, 24 falls within that range.
>
> Am I missing something vital to this problem? What you have said seems
> incorrect to me.

Well, of course, you're right in a strict sense.
But the constant 24 in PG is parsed as an int4 not an int2, and PG isn't
coercing it automatically to an int2 for the function.

> What version are you using?

His original setup worked in 7.2 (and still does for my test case); the
behavior has changed in 7.3 (as shown in my email).

--

Joel BURTON | joel(at)joelburton(dot)com | joelburton.com | aim: wjoelburton
Independent Knowledge Management Consultant

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Matthew Gabeler-Lee 2002-12-04 20:41:23 Re: 7.3 no longer using indexes for LIKE queries
Previous Message scott.marlowe 2002-12-04 20:32:46 Re: performance tuning