Unix Technical Forum

BUG #2040: buggy cast of INT8 to text

This is a discussion on BUG #2040: buggy cast of INT8 to text within the pgsql Bugs forums, part of the PostgreSQL category; --> The following bug has been logged online: Bug reference: 2040 Logged by: Sebastien MAYER Email address: sebastien.mayer@briosoft.com PostgreSQL version: ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > pgsql Bugs

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-10-2008, 10:26 AM
Sebastien MAYER
 
Posts: n/a
Default BUG #2040: buggy cast of INT8 to text


The following bug has been logged online:

Bug reference: 2040
Logged by: Sebastien MAYER
Email address: sebastien.mayer@briosoft.com
PostgreSQL version: 8.04
Operating system: Linux Fedora core 4
Description: buggy cast of INT8 to text
Details:

in plpgsql :
declare
var_text text;
var_int8 INT8;
begin
var_int8 := 123456;
-- next line give some strange result... but not always
var_text := 'the value of var_int8 is ' || var_int8;
.....

end;
I wrote a small b_bigint_to_text(int8) returns text
and will use it until i see some fix on this.
More generally, the oid, wich is int4 does not fit the currval, nextvall etc
wich returns int8. Since you moved the serial concept from 32 bits to 64
bits (which look good to me), you still have old 32 bits style functions and
variable (oid !) mixed with the new 64 bits concept.
But, i thanks you everyday of my programmer life anyway !!!!!
seb

---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faq

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-10-2008, 10:27 AM
Tom Lane
 
Posts: n/a
Default Re: BUG #2040: buggy cast of INT8 to text

"Sebastien MAYER" <sebastien.mayer@briosoft.com> writes:
> -- next line give some strange result... but not always
> var_text := 'the value of var_int8 is ' || var_int8;


Couldn't duplicate a problem here ... you need to give a reproducible
test case if you want anyone to look into this.

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
choose an index scan if your joining column's datatypes do not
match

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 04:46 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com