Re: [HACKERS] 8.5 release timetable, again

2009-08-23 Thread Tom Lane
Robert Haas robertmh...@gmail.com writes: I posted a note about a week ago which drew far less commentary than I expected, regarding the timetable for the release of 8.5. http://archives.postgresql.org/pgsql-hackers/2009-08/msg01256.php Perhaps this is already being discussed on -core, but

Re: [HACKERS] Slaying the HYPOTamus

2009-08-23 Thread Paul Matthews
Tom Lane wrote: Greg Stark gsst...@mit.edu writes: If there's a performance advantage then we could add a configure test and define the macro to call hypot(). You said it existed before C99 though, how widespread was it? If it's in all the platforms we support it might be reasonable to

Re: [HACKERS] Slaying the HYPOTamus

2009-08-23 Thread Magnus Hagander
On Sun, Aug 23, 2009 at 07:42, Tom Lanet...@sss.pgh.pa.us wrote: Greg Stark gsst...@mit.edu writes: If there's a performance advantage then we could add a configure test and define the macro to call hypot(). You said it existed before C99 though, how widespread was it? If it's in all the

Re: [HACKERS] Slaying the HYPOTamus

2009-08-23 Thread Nicolas Barbier
2009/8/23 Magnus Hagander mag...@hagander.net: For another data point, Microsoft documentation says: This POSIX function is deprecated beginning in Visual C++ 2005. Use the ISO C++ conformant  _hypot instead. _hypot() has been there since Windows 95, so it shouldn't be a problem to use it -

Re: [HACKERS] Unicode UTF-8 table formatting for psql text output

2009-08-23 Thread Roger Leigh
On Sun, Aug 23, 2009 at 01:49:02AM +0100, Roger Leigh wrote: On Sat, Aug 22, 2009 at 07:42:10PM -0400, Robert Haas wrote: On Sat, Aug 22, 2009 at 2:13 PM, Roger Leighrle...@debian.org wrote: Further minor cleanups to tweak column alignment in a corner case, and to correct indentation to

Re: [HACKERS] 8.5 release timetable, again

2009-08-23 Thread Robert Haas
On Sun, Aug 23, 2009 at 1:57 AM, Tom Lanet...@sss.pgh.pa.us wrote: Robert Haas robertmh...@gmail.com writes: I posted a note about a week ago which drew far less commentary than I expected, regarding the timetable for the release of 8.5.

[HACKERS] clang's static checker report.

2009-08-23 Thread Grzegorz Jaskiewicz
So, after successful, and helpful Saturday with llvm's clang static checker, I decided to run it against postgresql's source code. Result can be seen at: http://zlew.org/postgresql_static_check/scan-build-2009-08-23-5/ . One directory below is the tar file, with the report. I am sure

Re: [HACKERS] clang's static checker report.

2009-08-23 Thread Greg Stark
On Sun, Aug 23, 2009 at 4:57 PM, Grzegorz Jaskiewiczg...@pointblue.com.pl wrote: I am sure there's plenty of false positives, but I am also quite sure there's many real errors on that list. Do you know how to teach clang about functions which never return? That seems to be causing most of the

Re: [HACKERS] [PATCH 5/6] psql: print_aligned_text uses table formatting

2009-08-23 Thread Roger Leigh
On Sun, Aug 23, 2009 at 11:47:02AM -0400, Alvaro Herrera wrote: Roger Leigh wrote: Convert print_aligned_text, and its helper function, to use table formatting in place of hardcoded ASCII characters. @@ -841,7 +856,10 @@ print_aligned_text(const printTableContent *cont, const

Re: [HACKERS] clang's static checker report.

2009-08-23 Thread Grzegorz Jaskiewicz
On 23 Aug 2009, at 17:41, Greg Stark wrote: On Sun, Aug 23, 2009 at 4:57 PM, Grzegorz Jaskiewiczg...@pointblue.com.pl wrote: I am sure there's plenty of false positives, but I am also quite sure there's many real errors on that list. Do you know how to teach clang about functions which

Re: [HACKERS] clang's static checker report.

2009-08-23 Thread Martijn van Oosterhout
On Sun, Aug 23, 2009 at 05:41:24PM +0100, Greg Stark wrote: On Sun, Aug 23, 2009 at 4:57 PM, Grzegorz Jaskiewiczg...@pointblue.com.pl wrote: I am sure there's plenty of false positives, but I am also quite sure there's many real errors on that list. Do you know how to teach clang about

Re: [HACKERS] clang's static checker report.

2009-08-23 Thread Grzegorz Jaskiewicz
On 23 Aug 2009, at 17:41, Greg Stark wrote: Do you know how to teach clang about functions which never return? http://clang-analyzer.llvm.org/annotations.html#attr_noreturn -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription:

Re: [HACKERS] clang's static checker report.

2009-08-23 Thread Grzegorz Jaskiewicz
http://zlew.org/postgresql_static_check/scan-build-2009-08-23-5/report-MAVb5D.html#EndPath for a very positive one - at least from strict language point of view. consider: float f = 1; f++; printf(%f\n, f); -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make

Re: [HACKERS] clang's static checker report.

2009-08-23 Thread Greg Stark
On Sun, Aug 23, 2009 at 6:11 PM, Grzegorz Jaskiewiczg...@pointblue.com.pl wrote: http://zlew.org/postgresql_static_check/scan-build-2009-08-23-5/report-MAVb5D.html#EndPath for a very positive one - at least from strict language point of view. consider: float f = 1; f++; printf(%f\n,

Re: [HACKERS] clang's static checker report.

2009-08-23 Thread Grzegorz Jaskiewicz
about the false positives around 'null reference'. I'll try sticking exit(1)'s at the end of each macro - and see if that makes most of them go away. -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription:

Re: [HACKERS] clang's static checker report.

2009-08-23 Thread Tom Lane
Greg Stark gsst...@mit.edu writes: On Sun, Aug 23, 2009 at 6:11 PM, Grzegorz Jaskiewiczg...@pointblue.com.pl wrote: http://zlew.org/postgresql_static_check/scan-build-2009-08-23-5/report-MAVb5D.html#EndPath for a very positive one - at least from strict language point of view. consider:

Re: [HACKERS] clang's static checker report.

2009-08-23 Thread Grzegorz Jaskiewicz
memory leak: http://zlew.org/postgresql_static_check/scan-build-2009-08-23-5/report-46wcmJ.html#EndPath -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers

Re: [HACKERS] [PATCH 5/6] psql: print_aligned_text uses table formatting

2009-08-23 Thread Alvaro Herrera
Roger Leigh wrote: Convert print_aligned_text, and its helper function, to use table formatting in place of hardcoded ASCII characters. @@ -841,7 +856,10 @@ print_aligned_text(const printTableContent *cont, const printTextFormat *format, /* left border */

Re: [HACKERS] clang's static checker report.

2009-08-23 Thread Grzegorz Jaskiewicz
this one should contain substantialy less false positives, because error functions were marked as the 'never exit' points: http://zlew.org/postgresql_static_check/scan-build-2009-08-23-9/ for the record, here's patch that marks elog, etc as dead ends: Index: src/include/utils/elog.h

Re: [HACKERS] slow commits with heavy temp table usage in 8.4.0

2009-08-23 Thread Tom Lane
Todd A. Cook tc...@blackducksoftware.com writes: Tom Lane wrote: If you roll back a truncate, do you get the expected state? I did a number of variations on the test below, with and without on drop commit, and similar tests where the create table is done before the begin. After the

Re: [HACKERS] clang's static checker report.

2009-08-23 Thread Tom Lane
Grzegorz Jaskiewicz g...@pointblue.com.pl writes: for the record, here's patch that marks elog, etc as dead ends: That does not look like the right thing at all, since now the checker will believe that elog(NOTICE) and such don't return. I think you need to use Martijn's suggestion instead.

Re: [HACKERS] clang's static checker report.

2009-08-23 Thread Grzegorz Jaskiewicz
On 23 Aug 2009, at 20:31, Tom Lane wrote: Grzegorz Jaskiewicz g...@pointblue.com.pl writes: for the record, here's patch that marks elog, etc as dead ends: That does not look like the right thing at all, since now the checker will believe that elog(NOTICE) and such don't return. I think

Re: [HACKERS] clang's static checker report.

2009-08-23 Thread Grzegorz Jaskiewicz
ok folks, here's the last one for Today: http://zlew.org/postgresql_static_check/scan-build-2009-08-23-29/ tar ball with report can be downloaded from here: http://zlew.org/postgresql_static_check/postgresql_static_check_23rdAugust2009.tar.xz (compressed with lzma's xz tool). here's the

Re: [HACKERS] [PATCH 5/6] psql: print_aligned_text uses table formatting

2009-08-23 Thread Alvaro Herrera
Roger Leigh wrote: On Sun, Aug 23, 2009 at 11:47:02AM -0400, Alvaro Herrera wrote: Wouldn't it be better to do a single fprintf call here instead of fputc + fputs? It's certainly possible to change it; the above might be slightly more efficient than a call to fprintf since you skip

Re: [HACKERS] Unicode UTF-8 table formatting for psql text output

2009-08-23 Thread Alvaro Herrera
Roger Leigh escribió: +#if (defined(HAVE_LANGINFO_H) defined(CODESET)) + if (!strcmp(nl_langinfo(CODESET), UTF-8)) + text_format = utf8format; +#endif I think you should also try to match to UTF8, and do it in case-insensitive manner (pg_strcasecmp), just like chklocale.c.

Re: [HACKERS] clang's static checker report.

2009-08-23 Thread Greg Stark
On Sun, Aug 23, 2009 at 11:16 PM, Grzegorz Jaskiewiczg...@pointblue.com.pl wrote: ok folks, here's the last one for Today: http://zlew.org/postgresql_static_check/scan-build-2009-08-23-29/ This does look better. The first one I looked at looks like a legitimate bug. The nice thing is that this

Re: [HACKERS] clang's static checker report.

2009-08-23 Thread Grzegorz Jaskiewicz
On 24 Aug 2009, at 00:15, Greg Stark wrote: On Sun, Aug 23, 2009 at 11:16 PM, Grzegorz Jaskiewiczg...@pointblue.com.pl wrote: ok folks, here's the last one for Today: http://zlew.org/postgresql_static_check/scan-build-2009-08-23-29/ This does look better. The first one I looked at looks

[HACKERS] Install from Source On Windows - University of Sydney Research

2009-08-23 Thread Kushal Vaghani
Hello, I have downloaded and built the 8.2.4 postgreSQL from source. This was done by running the build.bat file under src\tools\msvc. I do get a few errors with some contrib projects, but I do not care about them. When i do install(install.pl), there is a destination directory created. Now my

[HACKERS] help:how to write a planner_hook and other hooks in pg

2009-08-23 Thread 张中
Hi all: I am doing some experiments programming on PG. I tried to modify planner and I find the ‘planner_hook’ in source code, but I don’t know how to use it. Anybody knows? If any code sample, very precious. Thanks 张茂森 ZhangMaosen

Re: [HACKERS] help:how to write a planner_hook and other hooks in pg

2009-08-23 Thread Pavel Stehule
Hello http://archives.postgresql.org/pgsql-patches/2007-05/msg00421.php regards Pavel Stehule 2009/8/24 张中 zhangzh...@taobao.com: Hi all: I am doing some experiments programming on PG. I tried to modify planner and I find the ‘planner_hook’ in source code, but I don’t know how to use it.

[HACKERS] 答复: [HACKERS] help:how to write a plan ner_hook and other hooks in pg

2009-08-23 Thread 张中
Thank you very much! ZhangMaosen -邮件原件- 发件人: Pavel Stehule [mailto:pavel.steh...@gmail.com] 发送时间: 2009年8月24日 10:54 收件人: 张中 抄送: pgsql-hackers@postgresql.org 主题: Re: [HACKERS] help:how to write a planner_hook and other hooks in pg Hello

Re: [HACKERS] Install from Source On Windows - University of Sydney Research

2009-08-23 Thread Robert Haas
On Sun, Aug 23, 2009 at 11:16 AM, Kushal Vaghanikushalvagh...@gmail.com wrote: I have downloaded and built the 8.2.4 postgreSQL from source. This was done by running the build.bat file under src\tools\msvc. I do get a few errors with some contrib projects, but I do not care about them. When i