X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.193]) by svr1.postgresql.org (Postfix) with ESMTP id CD49B30EF01 for ; Mon, 16 Jun 2003 15:56:41 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (svr1.postgresql.org [64.117.224.193]) (amavisd-new, port 10024) with ESMTP id 46292-09 for ; Mon, 16 Jun 2003 12:56:31 -0300 (ADT) Received: from oulu.fi (ousrvr.oulu.fi [130.231.240.1]) by svr1.postgresql.org (Postfix) with ESMTP id A243030EEBD for ; Mon, 16 Jun 2003 12:56:30 -0300 (ADT) Received: from paju.oulu.fi (paju.oulu.fi [130.231.240.20]) by oulu.fi (8.12.9/8.12.8) with ESMTP id h5GFuSI3018488; Mon, 16 Jun 2003 18:56:28 +0300 (EEST) Received: from localhost (haapala@localhost) by paju.oulu.fi (8.12.9/8.12.8) with ESMTP id h5GFuRLj002856; Mon, 16 Jun 2003 18:56:28 +0300 (EEST) X-Authentication-Warning: paju.oulu.fi: haapala owned process doing -bs Date: Mon, 16 Jun 2003 18:56:27 +0300 (EEST) From: Antti Haapala X-X-Sender: haapala@paju.oulu.fi To: Tom Lane Cc: Tomasz Myrta , PGSQL-SQL Subject: Re: casting interval to time In-Reply-To: <3222.1055776631@sss.pgh.pa.us> Message-ID: References: <3EEDCB67.4090504@klaster.net> <2971.1055775231@sss.pgh.pa.us> <3EEDDB8D.5080401@klaster.net> <3222.1055776631@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=ISO-8859-1 Content-Transfer-Encoding: 8BIT X-Archive-Number: 200306/148 X-Sequence-Number: 13906 On Mon, 16 Jun 2003, Tom Lane wrote: > Tomasz Myrta writes: > > Dnia 2003-06-16 16:53, Użytkownik Tom Lane napisał: > > > Tomasz Myrta writes: > > > > > > > psql (PostgreSQL) 7.3.2 > > > > SELECT cast(cast('1 day 12 hours' as interval) as time); > > > > time > > > > ---------- > > > > 00:00:00 > > > > (1 row) > > > > > > > > > I get 12:00:00 here, using 7.3.3 ... platform-specific problem maybe? > > > Default Debian package. I got the same result even on a 7.3.3 Debian > > package. > > What do you get from "pg_config --configure"? What's the hardware > platform --- i386, or something else? Can anyone else reproduce this, > on any platform? template1=# select cast('25 hours'::interval as time); time ---------- 00:00:00 (1 row) template1=# select version(); version ------------------------------------------------------------------------ PostgreSQL 7.3.2 on i386-pc-linux-gnu, compiled by GCC gcc (GCC) 3.2.3 (1 row) It's also Debian (3.0). % pg_config --configure '--host=i386-linux' '--build=i386-linux' '--prefix=/usr' '--mandir=/usr/share/man' '--docdir=/usr/share/doc' '--bindir=/usr/lib/postgresql/bin' '--libdir=/usr/lib' '--includedir=/usr/include/postgresql' '--enable-recode' '--enable-nls' '--enable-integer-datetimes' (could be this?) '--enable-debug' '--disable-rpath' '--with-tcl' '--with-perl' '--with-python' '--with-pam' '--with-openssl' '--with-gnu-ld' '--with-krb5' '--with-tclconfig=/usr/lib/tcl8.4' '--with-tkconfig=/usr/lib/tk8.4' '--with-includes=/usr/include/tcl8.4' '--with-maxbackends=64' '--with-pgport=5432' 'DOCBOOKSTYLE=/usr/share/sgml/docbook/stylesheet/dsssl/modular' 'build_alias=i386-linux' 'host_alias=i386-linux' --- Not affected: GentooLinux 1.4 rc2 x86 w/ pg 7.3, gcc 3.2.1, glibc 2.3.1 w/ following configure options: '--prefix=/usr' '--mandir=/usr/share/man' '--host=i586-pc-linux-gnu' '--docdir=/usr/share/doc/postgresql-7.3' '--libdir=/usr/lib' '--enable-syslog' '--enable-depend' '--with-gnu-ld' '--with-pam' '--with-maxbackends=1024' '--with-python' '--with-perl' '--with-java' '--with-openssl' '--enable-locale' '--enable-nls' '--enable-multibyte' '--with-CXX' 'CC=gcc' 'CFLAGS=-march=pentium-mmx -O3 -pipe' 'host_alias=i586-pc-linux-gnu' -- Antti Haapala