pg.ddx.io pgsql-sql@postgresql.org mailing list archive
help / color / mirror / Atom feedBug on parameter bigint in PL/PGSQL
4+ messages / 3 participants
[nested] [flat]
* Bug on parameter bigint in PL/PGSQL
@ 2003-08-22 11:59 Michele Bendazzoli <mickymouse@mickymouse.it>
2003-08-22 13:00 ` Re: Bug on parameter bigint in PL/PGSQL Stephan Szabo <sszabo@megazone.bigpanda.com>
2003-08-22 13:05 ` Re: Bug on parameter bigint in PL/PGSQL Richard Huxton <dev@archonet.com>
0 siblings, 2 replies; 4+ messages in thread
From: Michele Bendazzoli @ 2003-08-22 11:59 UTC (permalink / raw)
To: pgsql-sql
I think i found a bug in PL/PGSQL: when i use a parameter bigint (int8)
and call the function from psql an error message which says that "the
functioname(bigint) doesn't exist" is displayed.
If i turn the int8 to int4 all works fine ...
Now i use two int4 instead of one int8: is advisable?
ciao, Michele
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: Bug on parameter bigint in PL/PGSQL
2003-08-22 11:59 Bug on parameter bigint in PL/PGSQL Michele Bendazzoli <mickymouse@mickymouse.it>
@ 2003-08-22 13:00 ` Stephan Szabo <sszabo@megazone.bigpanda.com>
1 sibling, 0 replies; 4+ messages in thread
From: Stephan Szabo @ 2003-08-22 13:00 UTC (permalink / raw)
To: Michele Bendazzoli <mickymouse@mickymouse.it>; +Cc: pgsql-sql
On Fri, 22 Aug 2003, Michele Bendazzoli wrote:
> I think i found a bug in PL/PGSQL: when i use a parameter bigint (int8)
> and call the function from psql an error message which says that "the
> functioname(bigint) doesn't exist" is displayed.
> If i turn the int8 to int4 all works fine ...
I can't reproduce from the information above. Integer constants are
treated as int4, but it should be able to cast that to bigint. What is
the function you are using to test and what version?
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: Bug on parameter bigint in PL/PGSQL
2003-08-22 11:59 Bug on parameter bigint in PL/PGSQL Michele Bendazzoli <mickymouse@mickymouse.it>
@ 2003-08-22 13:05 ` Richard Huxton <dev@archonet.com>
2003-08-22 14:24 ` Re: Bug on parameter bigint in PL/PGSQL Michele Bendazzoli <mickymouse@mickymouse.it>
1 sibling, 1 reply; 4+ messages in thread
From: Richard Huxton @ 2003-08-22 13:05 UTC (permalink / raw)
To: Michele Bendazzoli <mickymouse@mickymouse.it>; pgsql-sql
On Friday 22 August 2003 12:59, Michele Bendazzoli wrote:
> I think i found a bug in PL/PGSQL: when i use a parameter bigint (int8)
> and call the function from psql an error message which says that "the
> functioname(bigint) doesn't exist" is displayed.
> If i turn the int8 to int4 all works fine ...
Seems ok here:
CREATE FUNCTION my_bigint_test(int8) RETURNS int8 AS '
BEGIN
RETURN $1 + 1::int8;
END;
' LANGUAGE 'plpgsql';
SELECT my_bigint_test(1);
CREATE FUNCTION
my_bigint_test
----------------
2
(1 row)
SELECT my_bigint_test(2::int8);
my_bigint_test
----------------
3
(1 row)
Can you provide an actual example?
--
Richard Huxton
Archonet Ltd
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: Bug on parameter bigint in PL/PGSQL
2003-08-22 11:59 Bug on parameter bigint in PL/PGSQL Michele Bendazzoli <mickymouse@mickymouse.it>
2003-08-22 13:05 ` Re: Bug on parameter bigint in PL/PGSQL Richard Huxton <dev@archonet.com>
@ 2003-08-22 14:24 ` Michele Bendazzoli <mickymouse@mickymouse.it>
0 siblings, 0 replies; 4+ messages in thread
From: Michele Bendazzoli @ 2003-08-22 14:24 UTC (permalink / raw)
To: pgsql-sql
On Fri, 2003-08-22 at 15:05, Richard Huxton wrote:
> On Friday 22 August 2003 12:59, Michele Bendazzoli wrote:
> > I think i found a bug in PL/PGSQL: when i use a parameter bigint (int8)
> > and call the function from psql an error message which says that "the
> > functioname(bigint) doesn't exist" is displayed.
> > If i turn the int8 to int4 all works fine ...
>
> Seems ok here:
cut
> Can you provide an actual example?
I delete the example because i don't need it anymore (it was a function
that simply get a int8 and return the last 4 byte (a int4), but now i
don't use int8 anymore) and the one I try to reproduce now just works
fine ...
Maybe it was only my mistake due to the overload capacity of PL/PGSQL: i
wonder if I was testing the errate version of the function while i was
modifying another: the power of postgresql :-)
Thank anyway.
ciao, Michele
^ permalink raw reply [nested|flat] 4+ messages in thread
end of thread, other threads:[~2003-08-22 14:24 UTC | newest]
Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2003-08-22 11:59 Bug on parameter bigint in PL/PGSQL Michele Bendazzoli <mickymouse@mickymouse.it>
2003-08-22 13:00 ` Stephan Szabo <sszabo@megazone.bigpanda.com>
2003-08-22 13:05 ` Richard Huxton <dev@archonet.com>
2003-08-22 14:24 ` Michele Bendazzoli <mickymouse@mickymouse.it>
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