Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2010-10

PostgreSQL 8.4 Ubuntu 10.10 x64

6 messages · 4 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Andrew Brunner

I've got a problem with the PostgreSQL component. I've got an insert statement with int64 values. The prepare command goes through but the server denies the entire packet with the string value of the int64 is too large for integer type error.

The fields were all declared as bigint and the parameter binding happened as LargeInt. This worked on MySQL but I'm sure everything is working on my end. Anyone have problems with using Int64 types and insert?

Report as bug?

Reply by email

Martin Schreiber
to Andrew Brunner
Andrew Brunner wrote 10 lines
I've got a problem with the PostgreSQL component. I've got an insert statement with int64 values. The prepare command goes through but the server denies the entire packet with the string value of the int64 is too large for integer type error. The fields were all declared as bigint and the parameter binding happened as LargeInt. This worked on MySQL but I'm sure everything is working on my end. Anyone have problems with using Int64 types and insert?

The problem is in TypeStrings, ftLargeInt should return 'bigint' instead of 'int'. Fixed in MSEide+MSEgui trunk 4028.
http://developer.berlios.de/svn/?group_id=11520

Interresting, MSEgui is used in production since years with PostgreSQL, Firebird, MySQL and Sqlite3, nobody ever reported the bug...

Martin

Reply by email

Michael Van Canneyt
to Martin Schreiber
Martin Schreiber wrote 18 lines
Andrew Brunner wrote: > I've got a problem with the PostgreSQL component. I've got an insert > statement with int64 values. The prepare command goes through but the > server denies the entire packet with the string value of the int64 is > too large for integer type error. > > The fields were all declared as bigint and the parameter binding > happened as LargeInt. This worked on MySQL but I'm sure everything is > working on my end. Anyone have problems with using Int64 types and > insert? > The problem is in TypeStrings, ftLargeInt should return 'bigint' instead of 'int'. Fixed in MSEide+MSEgui trunk 4028. http://developer.berlios.de/svn/?group_id=11520 Interresting, MSEgui is used in production since years with PostgreSQL, Firebird, MySQL and Sqlite3, nobody ever reported the bug...

This is not so surprising. Often I meet databases which go against everything I hold for 'unshakable' truths. Use cases differ wildly.

Anyway, thanks for the tip, fixed in FPC SVN rev. 16197.

Michael.

Reply by email

Jonas Maebe
to Michael Van Canneyt
Michael Van Canneyt wrote 17 lines
On Fri, 22 Oct 2010, Martin Schreiber wrote: > Andrew Brunner wrote: > > The problem is in TypeStrings, ftLargeInt should return 'bigint' > instead > of 'int'. Fixed in MSEide+MSEgui trunk 4028. > http://developer.berlios.de/svn/?group_id=11520 > > Interresting, MSEgui is used in production since years with > PostgreSQL, > Firebird, MySQL and Sqlite3, nobody ever reported the bug... This is not so surprising. Often I meet databases which go against everything I hold for 'unshakable' truths. Use cases differ wildly. Anyway, thanks for the tip, fixed in FPC SVN rev. 16197.

Is that a fix for http://bugs.freepascal.org/view.php?id=17683 ?

Jonas

Reply by email

Michael Van Canneyt
to Jonas Maebe
Jonas Maebe wrote 20 lines
On 22 Oct 2010, at 11:21, Michael Van Canneyt wrote: > On Fri, 22 Oct 2010, Martin Schreiber wrote: > >> Andrew Brunner wrote: >> >> The problem is in TypeStrings, ftLargeInt should return 'bigint' instead >> of 'int'. Fixed in MSEide+MSEgui trunk 4028. >> http://developer.berlios.de/svn/?group_id=11520 >> >> Interresting, MSEgui is used in production since years with PostgreSQL, >> Firebird, MySQL and Sqlite3, nobody ever reported the bug... > > This is not so surprising. Often I meet databases which go against > everything I hold for 'unshakable' truths. Use cases differ wildly. > > Anyway, thanks for the tip, fixed in FPC SVN rev. 16197. Is that a fix for http://bugs.freepascal.org/view.php?id=17683 ?

You found it faster than I did :-) I already set it to fixed.

Michael.

Reply by email

Andrew Brunner
to Martin Schreiber: The problem is in TypeStrings, ftLargeInt should return 'bigint' instead of 'int'. Fixed…
Martin Schreiber wrote
The problem is in TypeStrings, ftLargeInt should return 'bigint' instead of 'int'. Fixed in MSEide+MSEgui trunk 4028. http://developer.berlios.de/svn/?group_id=11520

Thanks Martin!

Interresting, MSEgui is used in production since years with PostgreSQL, Firebird, MySQL and Sqlite3, nobody ever reported the bug...

Well the only way to reveal the flaw was to exceed integer range, for most smaller that would be improbable. The project I have here uses large indexes and many identifiers.

Reply by email