[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gambas-bugtracker] Bug #2921: Postgresql 19.900000000000055 is 20 in Gambas


http://gambaswiki.org/bugtracker/edit?object=BUG.2921&from=L21haW4-

Christof THALHOFER reported a new bug.

Summary
-------

Postgresql 19.900000000000055 is 20 in Gambas

Type             : Bug
Priority         : High
Gambas version   : 3.19
Product          : Database component


Description
-----------

Since Gambas 3.19 there seems to exist new awful bug with postgresql connections.

Given $Con is a existing connection to a PG server.

----------------------------------------------------------

Public Sub TestBugPostgresNineteenNinetyIsTwenty()
    
    Dim qry As String
    Dim res As Result
    
    qry = "Select 19.900000000000055::double precision as price;"
    res = $Con.Exec(qry)
    
    Debug "res!price";; res!price ' Prints "20" on the console
    Assert.RelativeApproximate(res!price, 19.90, 0.001)
    
End

------------------------------------------------------------

19.900000000000055 coming from postgresql is 20 in Gambas


System information
------------------

[System]
Gambas=3.19.3
OperatingSystem=Linux
Distribution=Ubuntu 20.04.6 LTS (Focal Fossa)
Kernel=5.4.0-190-generic
Architecture=x86_64
Cores=8
Memory=15442M
Language=de_DE.UTF-8
Platform=x11
Desktop=XFCE
DesktopResolution=96
DesktopScale=7
WidgetTheme=proxy
Font=DejaVu Sans,10
[Programs]
dpkg=Debian »dpkg« Paketmanagement-Programm Version 1.19.7 (amd64).
gcc=gcc (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0
git=git version 2.25.1
msgmerge=msgmerge (GNU gettext-tools) 0.19.8.1
rpmbuild=RPM version 4.14.2.1
[Libraries]
Cairo=libcairo.so.2.11600.0
Curl=libcurl.so.4.6.0
DBus=libdbus-1.so.3.19.11
GDK2=libgdk-x11-2.0.so.0.2400.32
GDK3=libgdk-3.so.0.2404.16
GStreamer=libgstreamer-1.0.so.0.1603.0
GTK+2=libgtk-x11-2.0.so.0.2400.32
GTK+3=libgtk-3.so.0.2404.16
OpenGL=libGL.so.1.7.0
Poppler=libpoppler.so.97.0.0
QT5=libQt5Core.so.5.12.8
RSvg=librsvg-2.so.2.47.0
SDL=libSDL2-2.0.so.0.10.0
SQLite 3=libsqlite3.so.0.8.6
[Environment]
CLUTTER_IM_MODULE=xim
DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus
DEFAULTS_PATH=/usr/share/gconf/xfce.default.path
DESKTOP_SESSION=xfce
DISPLAY=:0.0
EDITOR=mousepad
GB_GUI=gb.qt5
GDMSESSION=xfce
GTK_IM_MODULE=xim
GTK_MODULES=canberra-gtk-module:canberra-gtk-module
HOME=<home>
LANG=de_DE.UTF-8
LC_ALL=de_DE.UTF-8
LIBVIRT_DEFAULT_URI=qemu:///system
LOGNAME=<user>
MANDATORY_PATH=/usr/share/gconf/xfce.mandatory.path
PANEL_GDK_CORE_DEVICE_EVENTS=0
PATH=<home>/.local/bin:<home>/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/snap/bin
PWD=<home>
QT4_IM_MODULE=xim
QT_ACCESSIBILITY=1
QT_LOGGING_RULES=*.debug=false
QT_QPA_PLATFORMTHEME=appmenu-qt5
SESSION_MANAGER=local/<hostname>:@/tmp/.ICE-unix/4003,unix/<hostname>:/tmp/.ICE-unix/4003
SHELL=/usr/bin/zsh
SHLVL=0
SSH_AGENT_PID=4232
SSH_AUTH_SOCK=/tmp/ssh-WdmAxlSqA4N3/agent.4003
TZ=:/etc/localtime
USER=<user>
USERNAME=<user>
WINDOWPATH=2
XAUTHORITY=/run/user/1000/gdm/Xauthority
XDG_CONFIG_DIRS=/etc/xdg/xdg-xfce:/etc/xdg:/etc/xdg
XDG_CURRENT_DESKTOP=XFCE
XDG_DATA_DIRS=/usr/share/xfce4:/usr/share/xfce:<home>/.local/share/flatpak/exports/share:/var/lib/flatpak/exports/share:/usr/local/share/:/usr/share/:/var/lib/snapd/desktop:/var/lib/snapd/desktop:/usr/share
XDG_MENU_PREFIX=xfce-
XDG_RUNTIME_DIR=/run/user/1000
XDG_SEAT=seat0
XDG_SESSION_CLASS=user
XDG_SESSION_DESKTOP=xfce
XDG_SESSION_ID=1
XDG_SESSION_TYPE=x11
XDG_VTNR=2
XMODIFIERS=@im=none


----[ Gambas bugtracker-list is hosted by https://www.hostsharing.net ]----

Follow-Ups:
[Gambas-bugtracker] Bug #2921: Postgresql 19.900000000000055 is 20 in Gambas<bugtracker@xxxxxxxxxxxxxx>
[Gambas-bugtracker] Bug #2921: Postgresql 19.900000000000055 is 20 in Gambas<bugtracker@xxxxxxxxxxxxxx>
[Gambas-bugtracker] Bug #2921: Postgresql 19.900000000000055 is 20 in Gambas<bugtracker@xxxxxxxxxxxxxx>
[Gambas-bugtracker] Bug #2921: Postgresql 19.900000000000055 is 20 in Gambas<bugtracker@xxxxxxxxxxxxxx>
[Gambas-bugtracker] Bug #2921: Postgresql 19.900000000000055 is 20 in Gambas<bugtracker@xxxxxxxxxxxxxx>
[Gambas-bugtracker] Bug #2921: Postgresql 19.900000000000055 is 20 in Gambas<bugtracker@xxxxxxxxxxxxxx>
[Gambas-bugtracker] Bug #2921: Postgresql 19.900000000000055 is 20 in Gambas<bugtracker@xxxxxxxxxxxxxx>
[Gambas-bugtracker] Bug #2921: Postgresql 19.900000000000055 is 20 in Gambas<bugtracker@xxxxxxxxxxxxxx>
[Gambas-bugtracker] Bug #2921: Postgresql 19.900000000000055 is 20 in Gambas<bugtracker@xxxxxxxxxxxxxx>
[Gambas-bugtracker] Bug #2921: Postgresql 19.900000000000055 is 20 in Gambas<bugtracker@xxxxxxxxxxxxxx>
[Gambas-bugtracker] Bug #2921: Postgresql 19.900000000000055 is 20 in Gambas<bugtracker@xxxxxxxxxxxxxx>
[Gambas-bugtracker] Bug #2921: Postgresql 19.900000000000055 is 20 in Gambas<bugtracker@xxxxxxxxxxxxxx>
[Gambas-bugtracker] Bug #2921: Postgresql 19.900000000000055 is 20 in Gambas<bugtracker@xxxxxxxxxxxxxx>
[Gambas-bugtracker] Bug #2921: Postgresql 19.900000000000055 is 20 in Gambas<bugtracker@xxxxxxxxxxxxxx>
[Gambas-bugtracker] Bug #2921: Postgresql 19.900000000000055 is 20 in Gambas<bugtracker@xxxxxxxxxxxxxx>
[Gambas-bugtracker] Bug #2921: Postgresql 19.900000000000055 is 20 in Gambas<bugtracker@xxxxxxxxxxxxxx>