How do I recollect my password?
pgtypeslib/timestamp problem
Hello Guest
  
  • Login
• Register…
• Start blog
  • Who, Where, When
• What can I do?
• What to Read?
  • Polls
• Avatars
• Interests
  • Cities and Countries
• Random blog
• Users search
  • Search
• Games
• Tests
• QAIX
  • Сообщества
• Talxy Chat
• Horoscope
• Online
 
Зарегистрируйся!

QAIX > PostgreSQL database development > pgtypeslib/timestamp­ problem 27 March 2003 17:59:52

  Recent blog posts: 
  They have birthday today: 
  Forums:   
  Discuss: 
  Recent forum topics: 
  Recent forum comments:
  Moderators:

pgtypeslib/timestamp­ problem

Michael Meskes 27 March 2003 17:59:52
 I found it, well not really that is. It seems the problem is triggered
by some gcc optimization. I'm using gcc 3.2.3. If I specify -O2 it does
not work correctly, without optimization it does. Now the big question
is which optimization is causing trouble.

It certainly is not -ffast-math as I do include the corresponding error
message which is not triggered. Unfortunately I cannot install the
complete 7.4 CVS version right now to see if the timestamp code in the
backend compiles correctly.

So here's the question comojng out of this all, anyone out here with an
idea why the timestamp "Wed Jul 12 17:34:29 2000" becomes "Wed Jul 12
4649:34:26.000002 2000" when putting it into timestamp format and back
out. The function is almost identical to timestamp_in resp.
timestamp_out. If these two functions and their helpers are compield
without "-O2" the output is correct.

Michael

--
Michael Meskes
Email: Michael@Fam-Meskes.­De
ICQ: 179140304
Go SF 49ers! Go Rhein Fire! Use Debian GNU/Linux! Use PostgreSQL!


-------------------­--------(end of broadcast)---------­------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHer­e" to majordomo@postgresq­l.org)

Add comment
Tom Lane 27 March 2003 17:07:48 permanent link ]
 Michael Meskes <meskes@postgresql.­org> writes:> So here's the question comojng out of this all, anyone out here with an> idea why the timestamp "Wed Jul 12 17:34:29 2000" becomes "Wed Jul 12> 4649:34:26.000002 2000" when putting it into timestamp format and back> out. The function is almost identical to timestamp_in resp.> timestamp_out. If these two functions and their helpers are compield> without "-O2" the output is correct.

FWIW, I get the correct answer in CVS tip on Red Hat Linux 8.0, which
is using gcc 3.2 (and -O2, per defaults in our makefiles):

regression=# set DateStyle TO postgres;
SET
regression=# select 'Wed Jul 12 17:34:29 2000'::timestamp;
timestamp
-------------------­-------
Wed Jul 12 17:34:29 2000
(1 row)

regards, tom lane


-------------------­--------(end of broadcast)---------­------------------
TIP 6: Have you searched our list archives?

http://archives.pos­tgresql.org

Add comment
Michael Meskes 27 March 2003 17:43:58 permanent link ]
 On Thu, Mar 27, 2003 at 09:07:48AM -0500, Tom Lane wrote:> FWIW, I get the correct answer in CVS tip on Red Hat Linux 8.0, which> is using gcc 3.2 (and -O2, per defaults in our makefiles):

Thanks Tom. I just wonder what's different in my makefile. It just does:

include $(top_builddir)/src­/Makefile.global
override CPPFLAGS := -O1 -g -I$(top_srcdir)/src­/interfaces/ecpg/inc­lude
-I$(top_srcdir)/src­/include/utils $(CPPFLAGS)

with "-O1" just inserted of course.

Tom, I take it you have released gcc 3.2 right? It seems my ione is
based on a CVS prerelease:

gcc -v
Reading specs from /usr/lib/gcc-lib/i3­86-linux/3.2.3/specs­
Configured with: ../src/configure -v
--enable-languages=­c,c++,java,f77,proto­,pascal,objc,ada --prefix=/usr
--mandir=/usr/share­/man --infodir=/usr/shar­e/info
--with-gxx-include-­dir=/usr/include/c++­/3.2 --enable-shared
--with-system-zlib --enable-nls --without-included-­gettext
--enable-__cxa_atex­it --enable-clocale=gn­u --enable-java-gc=bo­ehm
--enable-objc-gc i386-linux
Thread model: posix
gcc version 3.2.3 20030316 (Debian prerelease)

Michael
--
Michael Meskes
Email: Michael@Fam-Meskes.­De
ICQ: 179140304
Go SF 49ers! Go Rhein Fire! Use Debian GNU/Linux! Use PostgreSQL!


-------------------­--------(end of broadcast)---------­------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@postgresq­l.org so that your
message can get through to the mailing list cleanly

Add comment
Tom Lane 27 March 2003 17:59:52 permanent link ]
 Michael Meskes <meskes@postgresql.­org> writes:> Tom, I take it you have released gcc 3.2 right? It seems my ione is> based on a CVS prerelease:

It's whatever came with RH 8.0 ...

$ gcc -v
Reading specs from /usr/lib/gcc-lib/i3­86-redhat-linux/3.2/­specs
Configured with: ../configure --prefix=/usr --mandir=/usr/share­/man --infodir=/usr/shar­e/info --enable-shared --enable-threads=po­six --disable-checking --host=i386-redhat-­linux --with-system-zlib --enable-__cxa_atex­it
Thread model: posix
gcc version 3.2 20020903 (Red Hat Linux 8.0 3.2-7)

regards, tom lane


-------------------­--------(end of broadcast)---------­------------------
TIP 4: Don't 'kill -9' the postmaster

Add comment
 

Add new comment

As:
Login:  Password:  
 
 
  
 
Пожалуйста, относитесь к собеседникам уважительно, не используйте нецензурные слова, не злоупотребляйте заглавными буквами, не публикуйте рекламу и объявления о купле/продаже, а также материалы нарушающие сетевой этикет или УК РФ.


QAIX > PostgreSQL database development > pgtypeslib/timestamp­ problem 27 March 2003 17:59:52

see also:
Help with PERLCC
How to send files as Attachements to…
Dinesh Kumar/NCE/AMADEUS is out of the…
пройди тесты:
see also:
JBOSS Error
Please somebody help

  Copyright © 2001—2008 QAIX
Idea: Miсhael Monashev
Помощь и задать вопросы можно в сообществе support.qaix.com.
Сообщения об ошибках оставляем в сообществе bugs.qaix.com.
Предложения и комментарии пишем в сообществе suggest.qaix.com.
Информация для родителей.
Write us at:
If you would like to report an abuse of our service, such as a spam message, please .