Re: [HACKERS] src/tools/msvc usage instructions

2006-10-03 Thread Jeremy Drake
On Tue, 3 Oct 2006, Magnus Hagander wrote: Looks like the gendef script is failing. Check the contents of release\postgres\postgres.def - it should have thousands of symbols, but I'm willing to bet it's empty... It contains one word: EXPORTS. I assume this means it is empty. What should I

Re: [HACKERS] src/tools/msvc usage instructions

2006-10-03 Thread Magnus Hagander
Looks like the gendef script is failing. Check the contents of release\postgres\postgres.def - it should have thousands of symbols, but I'm willing to bet it's empty... It contains one word: EXPORTS. I assume this means it is empty. What should I do about it? Is there something I

Re: [HACKERS] src/tools/msvc usage instructions

2006-10-03 Thread Jeremy Drake
On Tue, 3 Oct 2006, Magnus Hagander wrote: Looks like the gendef script is failing. Check the contents of release\postgres\postgres.def - it should have thousands of symbols, but I'm willing to bet it's empty... It contains one word: EXPORTS. I assume this means it is empty.

Re: [HACKERS] src/tools/msvc usage instructions

2006-10-03 Thread Magnus Hagander
Delete the DEF file and run the gendef command manually (see the project file for commandline, IIRC there are no parameters, but just to be sure). I'm wondering if you're seeing the samre problem as Joachim Wieland (off-list conversation) where the output from dumpbin.exe goes to

Re: [HACKERS] src/tools/msvc usage instructions

2006-10-03 Thread Jeremy Drake
On Tue, 3 Oct 2006, Magnus Hagander wrote: Funky. Can you try having it run the dumpbin command into a tempfile, and then open-and-read that tempfile, to see if that makes a difference? (Assuming you know enough perl to do that, of course) Doing it as system(dumpbin /symbols $_ $tmpfn)

Re: [HACKERS] Faster StrNCpy

2006-10-03 Thread Zeugswetter Andreas DCP SD
I'm still interested to experiment with MemSet-then-strlcpy for namestrcpy, but given the LENCPY results this may be a loser too. Um, why not strlcpy then MemSet the rest ? Andreas ---(end of broadcast)--- TIP 4: Have you searched our list

Re: [HACKERS] src/tools/msvc usage instructions

2006-10-03 Thread Joachim Wieland
On Tue, Oct 03, 2006 at 12:27:47AM -0700, Jeremy Drake wrote: On Tue, 3 Oct 2006, Magnus Hagander wrote: Funky. Can you try having it run the dumpbin command into a tempfile, and then open-and-read that tempfile, to see if that makes a difference? (Assuming you know enough perl to do

Re: [HACKERS] timestamptz alias

2006-10-03 Thread Markus Schaber
Hi, Jim, Jim Nasby wrote: There's a difference between promoting and withholding info. I'd rather see us explicitly state which is preferred and why. Here's a small patch that adds an appropriate explanation. Index: doc/src/sgml/datatype.sgml

Re: [HACKERS] [PATCHES] Bad bug in fopen() wrapper code

2006-10-03 Thread Zeugswetter Andreas DCP SD
Magnus, is this the right fix? Well, actually msdn states: Return Value If successful, _setmode returns the previous translation mode. A return value of -1 indicates an error So, shouldn't we be testing for -1 instead of 0 ? The thing is probably academic, since _setmode is only supposed

Re: [HACKERS] Faster StrNCpy

2006-10-03 Thread mark
On Tue, Oct 03, 2006 at 10:24:10AM +0200, Zeugswetter Andreas DCP SD wrote: I'm still interested to experiment with MemSet-then-strlcpy for namestrcpy, but given the LENCPY results this may be a loser too. Um, why not strlcpy then MemSet the rest ? That's what strncpy() is supposed to be

Re: [HACKERS] Faster StrNCpy

2006-10-03 Thread Zeugswetter Andreas DCP SD
I'm still interested to experiment with MemSet-then-strlcpy for namestrcpy, but given the LENCPY results this may be a loser too. Um, why not strlcpy then MemSet the rest ? That's what strncpy() is supposed to be doing. Yes, but it obviously does not in some ports, and that was the

[HACKERS] PG qsort vs. Solaris

2006-10-03 Thread Zdenek Kotala
Postgres has own implementation of qsort. It is used only for Solaris, because in some cases Solaris implementation was terrible slow. Now, New qsort is present in the Solaris from version 9 update 6 and I performed some quick test and the speed is very similarly with pg implementation see

Re: [HACKERS] [PATCHES] Bad bug in fopen() wrapper code

2006-10-03 Thread Tom Lane
Zeugswetter Andreas DCP SD [EMAIL PROTECTED] writes: If successful, _setmode returns the previous translation mode. A return value of -1 indicates an error So, shouldn't we be testing for -1 instead of 0 ? I think the usual convention is to test for 0, unless there are other negative return

Re: [HACKERS] Faster StrNCpy

2006-10-03 Thread mark
On Tue, Oct 03, 2006 at 01:56:57PM +0200, Zeugswetter Andreas DCP SD wrote: I'm still interested to experiment with MemSet-then-strlcpy for namestrcpy, but given the LENCPY results this may be a loser too. Um, why not strlcpy then MemSet the rest ? That's what strncpy() is supposed

Re: [HACKERS] [PATCHES] Generic Monitoring Framework with DTrace patch

2006-10-03 Thread Peter Eisentraut
Robert Treat wrote: Also should installation.sgml mention the issueswith building 32 vs 64 bit binaries I'm not convinced there is an issue. dtrace will build the right binaries by default. If you're messing with mixed environments *and* delve into dtrace, you should probably be able to

Re: [HACKERS] Faster StrNCpy

2006-10-03 Thread Tom Lane
Zeugswetter Andreas DCP SD [EMAIL PROTECTED] writes: I'm still interested to experiment with MemSet-then-strlcpy for namestrcpy, but given the LENCPY results this may be a loser too. Um, why not strlcpy then MemSet the rest ? Two reasons: * The main point is to do the zeroing using

Re: [HACKERS] Faster StrNCpy

2006-10-03 Thread Tom Lane
[EMAIL PROTECTED] writes: ... It would come down to whether there was a security requirements that the last bytes were '\0' or not. I haven't seen anybody mention this as a requirement. I think it is a requirement for namestrcpy (because the result might end up on disk), but not elsewhere.

[HACKERS] tsearch2 error msg

2006-10-03 Thread Magnus Hagander
search=# select to_tsquery('foo bar'); ERROR: syntax error Might want to enhance that message to include the information that it's parsing the tsquery that's failing? I originally had it as part of a much larger query, and it took me a while to remember that it's tsearch that spits out that

[HACKERS] src/backend/parser/parse_expr.c:exprTypmod() question

2006-10-03 Thread Teodor Sigaev
I'm working on user-defined typmod and try to move all typmod calculations into type-specific functions. But there is a strange place: /* * exprTypmod - *returns the type-specific attrmod of the expression, if it can be *determined. In most cases, it can't and we return -1. */

Re: [HACKERS] tsearch2 error msg

2006-10-03 Thread Teodor Sigaev
Might want to enhance that message to include the information that it's parsing the tsquery that's failing? I originally had it as part of a much larger query, and it took me a while to remember that it's tsearch that spits out that very generic error message. It possible, but not for 8.2 :(

Re: [HACKERS] tsearch2 error msg

2006-10-03 Thread Magnus Hagander
Might want to enhance that message to include the information that it's parsing the tsquery that's failing? I originally had it as part of a much larger query, and it took me a while to remember that it's tsearch that spits out that very generic error message. It possible, but not for

Re: [HACKERS] PG qsort vs. Solaris

2006-10-03 Thread Tom Lane
Zdenek Kotala [EMAIL PROTECTED] writes: Is it time to remove PG qsort and use libc version for solaris 9, 10...? I have no particular desire to introduce a version number check until we have to. If you can show that the newer versions have a qsort that substantially *out-performs* ours, it

Re: [HACKERS] src/backend/parser/parse_expr.c:exprTypmod() question

2006-10-03 Thread Gregory Stark
Teodor Sigaev [EMAIL PROTECTED] writes: I'm working on user-defined typmod and try to move all typmod calculations into type-specific functions. But there is a strange place: /* * exprTypmod - *returns the type-specific attrmod of the expression, if it can be *determined. In

Re: [HACKERS] [pgsql-hackers] Daily digest v1.6352 (22 messages)

2006-10-03 Thread Marc Munro
On Mon, 2006-10-02 at 12:02 -0300, Shaunak Godbole wrote: Hi, We are trying to introduce access control. For this we have to rewrite the input query by replacing each relation by its corresponding authorized view. I assume from this that you are trying to implement something like Oracle's

Re: [HACKERS] timestamptz alias

2006-10-03 Thread Tom Lane
Markus Schaber [EMAIL PROTECTED] writes: Here's a small patch that adds an appropriate explanation. If we're going to document these aliases, what of float4, float8, and bool? Also, although the docs mention int2/int4/int8, it's more or less left to the reader's imagination to deduce what they

Re: [HACKERS] src/backend/parser/parse_expr.c:exprTypmod() question

2006-10-03 Thread Tom Lane
Gregory Stark [EMAIL PROTECTED] writes: Teodor Sigaev [EMAIL PROTECTED] writes: I'm working on user-defined typmod and try to move all typmod calculations into type-specific functions. But there is a strange place: Note that unlike most of the built-in types bpchar doesn't actually make

Re: [HACKERS] src/tools/msvc usage instructions

2006-10-03 Thread Tom Lane
Magnus Hagander [EMAIL PROTECTED] writes: which looks like they figured out that they needed to check for MicroSoft C explicitly. I have no idea why they do not define __STDC__ however. Can we just define __STDC__ when compiling that file (or rather, when compiling any bison-generated

Re: [HACKERS] timestamptz alias

2006-10-03 Thread Andrew Dunstan
Tom Lane wrote: Markus Schaber [EMAIL PROTECTED] writes: Here's a small patch that adds an appropriate explanation. If we're going to document these aliases, what of float4, float8, and bool? Also, although the docs mention int2/int4/int8, it's more or less left to the reader's

Re: [HACKERS] src/tools/msvc usage instructions

2006-10-03 Thread Chuck McDevitt
From my experience with Visual C++, using /Za isn't a good idea. When you set that, the compiler become very pedantic about following the ANSI speck to the letter, which usually means common posix functions aren't available under their normal names (The ansi spec says if the compiler defines

Re: [HACKERS] timestamptz alias

2006-10-03 Thread Jim C. Nasby
Moving to -docs On Tue, Oct 03, 2006 at 12:13:46PM -0400, Andrew Dunstan wrote: Tom Lane wrote: Markus Schaber [EMAIL PROTECTED] writes: Here's a small patch that adds an appropriate explanation. If we're going to document these aliases, what of float4, float8, and bool? Also,

Re: [HACKERS] tsearch2 error msg

2006-10-03 Thread AgentM
On Oct 3, 2006, at 10:49 , Oleg Bartunov wrote: On Tue, 3 Oct 2006, Magnus Hagander wrote: BTW, try # select plainto_tsquery('foo bar'); plainto_tsquery - 'foo' 'bar' (1 row) It parses plain text and makes tsquery. Function exists only in 8.2 - some later we add docs

Re: [HACKERS] PG qsort vs. Solaris

2006-10-03 Thread Neil Conway
On Tue, 2006-10-03 at 10:48 -0400, Tom Lane wrote: I have no particular desire to introduce a version number check until we have to. If you can show that the newer versions have a qsort that substantially *out-performs* ours Are there any platform-local variants of qsort() that substantially

Re: [HACKERS] tsearch2 error msg

2006-10-03 Thread Teodor Sigaev
This is great news- previously, I was using various regexes to sanitize input into user-accessible search fields. Would it be build in some simple query language? sam AND spade blue OR yellow (same AND spade) OR (blue AND yellow) That's exactly to_tsquery syntax, just change AND to and OR

Re: [HACKERS] [PATCHES] 7.4, 8.0 branches @ itanium2 icc

2006-10-03 Thread Tom Lane
Sergey E. Koposov [EMAIL PROTECTED] writes: Having recently tried to build 7.4, and 8.0 branches on Itanium2 with ICC 7.4 is not going to work with ICC anyway without considerably more extensive changes (eg, configure hacking). It might make sense to apply this patch to 8.0 but I can't get all

Re: [HACKERS] [PATCHES] 7.4, 8.0 branches @ itanium2 icc

2006-10-03 Thread Sergey E. Koposov
On Tue, 3 Oct 2006, Tom Lane wrote: Sergey E. Koposov [EMAIL PROTECTED] writes: Having recently tried to build 7.4, and 8.0 branches on Itanium2 with ICC 7.4 is not going to work with ICC anyway without considerably more extensive changes (eg, configure hacking). It might make sense to

Re: [HACKERS] src/tools/msvc usage instructions

2006-10-03 Thread Magnus Hagander
which looks like they figured out that they needed to check for MicroSoft C explicitly. I have no idea why they do not define __STDC__ however. Can we just define __STDC__ when compiling that file (or rather, when compiling any bison-generated output file)? Or is that likely to

Re: [HACKERS] PG qsort vs. Solaris

2006-10-03 Thread Tom Lane
Neil Conway [EMAIL PROTECTED] writes: Given the time that has been spent working around the braindamaged behavior of qsort() on various platforms, I would be more inclined to *always* use our qsort() instead of the platform's version. I've been heard to argue against that in the past, but I'm

Re: [HACKERS] src/tools/msvc usage instructions

2006-10-03 Thread Tom Lane
Magnus Hagander [EMAIL PROTECTED] writes: That seems pretty risky. Better to use the /Za switch or whatever it was to get the compiler to assert it for itself. Unfortunatly, that breaks things so bad it's not even funny. Um. Well, then we tell people not to use bison 2.1 with MSVC.

Re: [HACKERS] src/tools/msvc usage instructions

2006-10-03 Thread Bruce Momjian
Tom Lane wrote: Magnus Hagander [EMAIL PROTECTED] writes: That seems pretty risky. Better to use the /Za switch or whatever it was to get the compiler to assert it for itself. Unfortunatly, that breaks things so bad it's not even funny. Um. Well, then we tell people not to use

Re: [HACKERS] src/tools/msvc usage instructions

2006-10-03 Thread Magnus Hagander
That seems pretty risky. Better to use the /Za switch or whatever it was to get the compiler to assert it for itself. Unfortunatly, that breaks things so bad it's not even funny. Um. Well, then we tell people not to use bison 2.1 with MSVC. Or add a configure test to

[HACKERS] Tsearch2 and Snowball

2006-10-03 Thread Simon Riggs
I'm looking at some of the code in contrib/tsearch2/snowball and see that the code there is *generated* code. The Snowball stemmer produces this C code in much the same way bison reads gram.y My understanding is that the Snowball code moves forwards regularly and there are many other stemmers we

Re: [HACKERS] src/tools/msvc usage instructions

2006-10-03 Thread Tom Lane
Magnus Hagander [EMAIL PROTECTED] writes: Or add a configure test to prevent it, and display a proper error message. Yeha, I will do this. As long as we're touching that code: the existing test for too-old bison seriously sucks, because all that it does is to print a warning that most people

Re: [HACKERS] src/tools/msvc usage instructions

2006-10-03 Thread Magnus Hagander
Magnus Hagander [EMAIL PROTECTED] writes: Or add a configure test to prevent it, and display a proper error message. Yeha, I will do this. As long as we're touching that code: the existing test for too-old bison seriously sucks, because all that it does is to Oh, I'm not touching

Re: [HACKERS] [PATCHES] Bad bug in fopen() wrapper code

2006-10-03 Thread Magnus Hagander
I agree that this code is both wrong and unreadable (although in practice the _setmode will probably never fail, which is why our attention hasn't been drawn to it). Is someone going to submit a patch? I'm hesitant to change the code myself since I'm not in a

Re: [HACKERS] Another idea for dealing with cmin/cmax

2006-10-03 Thread Gregory Stark
ITAGAKI Takahiro [EMAIL PROTECTED] writes: ITL-like approach is more efficient than per-tuple XIDs unless all tuples in a page are locked at the same time. However, MAXTRANS and PCTFREE issues may bother us. I'm not sure how Oracle gets away with MAXTRANS. Somehow it seems to never arise as

Re: [HACKERS] PG qsort vs. Solaris

2006-10-03 Thread Tom Lane
Neil Conway [EMAIL PROTECTED] writes: Given the time that has been spent working around the braindamaged behavior of qsort() on various platforms, I would be more inclined to *always* use our qsort() instead of the platform's version. I spent a bit of time looking into why we hadn't chosen to

Re: [HACKERS] [PATCHES] vcbuild bison check

2006-10-03 Thread Tom Lane
Magnus Hagander [EMAIL PROTECTED] writes: Attached patch adds a version check for bison when running the vc++ build. Shouldn't it be looking for 2.1 as well? regards, tom lane ---(end of broadcast)--- TIP 5: don't forget

Re: [HACKERS] PG qsort vs. Solaris

2006-10-03 Thread Zdenek Kotala
Tom Lane wrote: Zdenek Kotala [EMAIL PROTECTED] writes: Is it time to remove PG qsort and use libc version for solaris 9, 10...? I have no particular desire to introduce a version number check until we have to. If you can show that the newer versions have a qsort that substantially

[HACKERS] Pie-in-sky dreaming about reworking tuple layout entirely

2006-10-03 Thread Gregory Stark
I can't shake the feeling that merely tweaking the way our varlenas work with a shortvarlena or with compressed varlena headers is missing the real source of our headaches. It seems very strange to me to be trying to step through a tuple with length bits at the head of every field. It's a lot of

Re: [HACKERS] [PATCHES] MSVC build broken (again)

2006-10-03 Thread Tom Lane
Magnus Hagander [EMAIL PROTECTED] writes: The code around errcode is definitly messy. In CVS now, it actually renames *our* errcode() function to __msvc_errcode, and exports this from postgres.exe. This is definitly very borken. Would it be possible to move the whole crtdefs.h block into

Re: [HACKERS] [PATCHES] vcbuild bison check

2006-10-03 Thread Magnus Hagander
Attached patch adds a version check for bison when running the vc++ build. Shouldn't it be looking for 2.1 as well? 2.1 is the broken one. It seemd it was fixed in 2.2, but 2.2 isn't realeased for win32 from what I cna tell. //Magnus ---(end of

Re: [HACKERS] PG qsort vs. Solaris

2006-10-03 Thread Zdenek Kotala
Tom Lane wrote: Neil Conway [EMAIL PROTECTED] writes: Given the time that has been spent working around the braindamaged behavior of qsort() on various platforms, I would be more inclined to *always* use our qsort() instead of the platform's version. snip I propose that we do the

Re: [HACKERS] [PATCHES] MSVC build broken (again)

2006-10-03 Thread Magnus Hagander
The code around errcode is definitly messy. In CVS now, it actually renames *our* errcode() function to __msvc_errcode, and exports this from postgres.exe. This is definitly very borken. Would it be possible to move the whole crtdefs.h block into win32.h? This would cause it to be

Re: [HACKERS] [PATCHES] Generic Monitoring Framework with DTrace patch

2006-10-03 Thread Zdenek Kotala
Peter Eisentraut wrote: Robert Treat wrote: Also should installation.sgml mention the issueswith building 32 vs 64 bit binaries I'm not convinced there is an issue. dtrace will build the right binaries by default. If you're messing with mixed environments *and* delve into dtrace, you

Re: [HACKERS] [PATCHES] MSVC build broken (again)

2006-10-03 Thread Tom Lane
Magnus Hagander [EMAIL PROTECTED] writes: Would it be possible to move the whole crtdefs.h block into win32.h? Nope, it needs to go before stdio.h and friends, unfortunatly. OK, patch committed as-is then. The whole thing still looks awfully icky though, particularly the way pg_config_os.h is

Re: [HACKERS] [PATCHES] vcbuild bison check

2006-10-03 Thread Tom Lane
Magnus Hagander [EMAIL PROTECTED] writes: Attached patch adds a version check for bison when running the vc++ build. Shouldn't it be looking for 2.1 as well? 2.1 is the broken one. Exactly. So we should reject it. It seemd it was fixed in 2.2, but 2.2 isn't realeased for win32 from

Re: [HACKERS] [PATCHES] Bad bug in fopen() wrapper code

2006-10-03 Thread Bruce Momjian
Applied. --- Bruce Momjian wrote: Bruce Momjian wrote: Magnus Hagander wrote: Now, I still twist my head around the lines: if ((fd = _open_osfhandle((long) h, fileFlags O_APPEND)) 0 || (fileFlags

Re: [HACKERS] PG qsort vs. Solaris

2006-10-03 Thread Neil Conway
On Tue, 2006-10-03 at 15:44 -0400, Tom Lane wrote: I propose that we do the following: 1. Switch to using port/qsort.c all the time. 2. Add a qsort_arg function that is identical to qsort except it also passes a void pointer through to the comparison function. This will allow us to

Re: [HACKERS] tsearch2 error msg

2006-10-03 Thread Martijn van Oosterhout
On Tue, Oct 03, 2006 at 04:34:06PM +0200, Magnus Hagander wrote: search=# select to_tsquery('foo bar'); ERROR: syntax error Seems to me, at the very least, the message should be: ERROR: tsearch: syntax error Then people have an idea where it comes from. Have a nice day, -- Martijn van

Re: [HACKERS] PG qsort vs. Solaris

2006-10-03 Thread Tom Lane
Neil Conway [EMAIL PROTECTED] writes: On Tue, 2006-10-03 at 15:44 -0400, Tom Lane wrote: 1. Switch to using port/qsort.c all the time. 2. Add a qsort_arg function that is identical to qsort except it also passes a void pointer through to the comparison function. This will allow us to get rid

Re: [HACKERS] PG qsort vs. Solaris

2006-10-03 Thread Gregory Stark
Tom Lane [EMAIL PROTECTED] writes: So basically, glibc's qsort is bad enough that even a 10%-more-comparisons advantage doesn't save it. Actually what I was more concerned about was things like on data structures with complex comparison routines. Things like sorting on arrays or ROWs. For

Re: [HACKERS] Pie-in-sky dreaming about reworking tuple layout entirely

2006-10-03 Thread Merlin Moncure
On 10/3/06, Gregory Stark [EMAIL PROTECTED] wrote: I can't shake the feeling that merely tweaking the way our varlenas work with a shortvarlena or with compressed varlena headers is missing the real source of our headaches. It seems very strange to me to be trying to step through a tuple with

Re: [HACKERS] PG qsort vs. Solaris

2006-10-03 Thread Bruce Momjian
Tom Lane wrote: Neil Conway [EMAIL PROTECTED] writes: On Tue, 2006-10-03 at 15:44 -0400, Tom Lane wrote: 1. Switch to using port/qsort.c all the time. 2. Add a qsort_arg function that is identical to qsort except it also passes a void pointer through to the comparison function. This will

Re: [HACKERS] PG qsort vs. Solaris

2006-10-03 Thread Tom Lane
Bruce Momjian [EMAIL PROTECTED] writes: Tom Lane wrote: I was planning to do it right now, on the grounds that #2 and #3 are bug fixes, and that fixing the existing memory leakage hazard is a good thing too. I am OK with doing it now, but calling it a bug fix seems like a stretch. ;-) How

[HACKERS] scripts/common.c minor memory leak

2006-10-03 Thread Martijn van Oosterhout
Just a minor thing. In yesno_prompt(), the value is resp is allocated memory that is never freed. File: src/bin/scripts/common.c Line: 218 Not terribly important though, it's not used in critical utilities, but it's used often. Found by coverity. -- Martijn van Oosterhout kleptog@svana.org

Re: [HACKERS] Numeric overflow problem + patch

2006-10-03 Thread Bruce Momjian
Patch applied. Thanks. --- David Fetter wrote: On Thu, Sep 28, 2006 at 11:16:56PM +0200, Martijn van Oosterhout wrote: On Thu, Sep 28, 2006 at 05:11:43PM -0400, Tom Lane wrote: David Fetter [EMAIL PROTECTED] writes:

Re: [HACKERS] scripts/common.c minor memory leak

2006-10-03 Thread Andrew Dunstan
Martijn van Oosterhout wrote: Just a minor thing. In yesno_prompt(), the value is resp is allocated memory that is never freed. File: src/bin/scripts/common.c Line: 218 Not terribly important though, it's not used in critical utilities, but it's used often. Found by coverity. It is

[HACKERS] timetz storage vs timestamptz

2006-10-03 Thread Jim C. Nasby
Why is it timestamptz can store a date and time to 1 microsecond in 8 bytes but a timetz needs 12 to store just the time to 1 microsecond? -- Jim Nasby[EMAIL PROTECTED] EnterpriseDB http://enterprisedb.com 512.569.9461 (cell)

[HACKERS] workaround for buggy strtod is not necessary

2006-10-03 Thread Zdenek Kotala
Solaris had broken strtod function when parse Inf and Nan. See solaris.h. This bug has been fixed for all current versions of Solaris ( 8, 9, 10). See http://sunsolve.sun.com/search/document.do?assetkey=1-21-108993-62-1searchclause=108993-62

Re: [HACKERS] workaround for buggy strtod is not necessary

2006-10-03 Thread Bruce Momjian
Zdenek Kotala wrote: Solaris had broken strtod function when parse Inf and Nan. See solaris.h. This bug has been fixed for all current versions of Solaris ( 8, 9, 10). See http://sunsolve.sun.com/search/document.do?assetkey=1-21-108993-62-1searchclause=108993-62

Re: [HACKERS] PG qsort vs. Solaris

2006-10-03 Thread Tom Lane
Gregory Stark [EMAIL PROTECTED] writes: Actually what I was more concerned about was things like on data structures with complex comparison routines. Things like sorting on arrays or ROWs. The important point here is that blowing up the cost of the comparison function by a factor of 3 (by

Re: [HACKERS] PG qsort vs. Solaris

2006-10-03 Thread Mark Kirkwood
Tom Lane wrote: Neil Conway [EMAIL PROTECTED] writes: Given the time that has been spent working around the braindamaged behavior of qsort() on various platforms, I would be more inclined to *always* use our qsort() instead of the platform's version. I've been heard to argue against that in

Re: [HACKERS] tsearch2 error msg

2006-10-03 Thread Tom Lane
Martijn van Oosterhout kleptog@svana.org writes: On Tue, Oct 03, 2006 at 04:34:06PM +0200, Magnus Hagander wrote: search=3D# select to_tsquery('foo bar'); ERROR: syntax error Seems to me, at the very least, the message should be: ERROR: tsearch: syntax error No, it should be something like

Re: [HACKERS] PG qsort vs. Solaris

2006-10-03 Thread Luke Lonergan
+1 - Luke On 10/3/06 2:58 PM, Mark Kirkwood [EMAIL PROTECTED] wrote: Tom Lane wrote: Neil Conway [EMAIL PROTECTED] writes: Given the time that has been spent working around the braindamaged behavior of qsort() on various platforms, I would be more inclined to *always* use our qsort()

Re: [HACKERS] timetz storage vs timestamptz

2006-10-03 Thread Tom Lane
Jim C. Nasby [EMAIL PROTECTED] writes: Why is it timestamptz can store a date and time to 1 microsecond in 8 bytes but a timetz needs 12 to store just the time to 1 microsecond? It's tracking the timezone explicitly ... something that timestamptz really ought to do too.

[HACKERS] buildfarm failures in ECPG-Check

2006-10-03 Thread Jeremy Drake
It looks like something broke the ECPG-Check recently. A number of buildfarm members are failing. On Tue, 3 Oct 2006, PG Build Farm wrote: The PGBuildfarm member mongoose had the following event on branch HEAD: Failed at Stage: ECPG-Check The snapshot timestamp for the build that

Re: [HACKERS] PG qsort vs. Solaris

2006-10-03 Thread mark
On Tue, Oct 03, 2006 at 03:44:38PM -0400, Tom Lane wrote: select count(*) from (select random()::text from generate_series(1,100) order by 1) ss; ... postgres=# select count(*) from (select random() from generate_series(1,100) order by 1) ss; I'm wondering whether 'order by 1' is

Re: [HACKERS] PG qsort vs. Solaris

2006-10-03 Thread Tom Lane
[EMAIL PROTECTED] writes: I'm wondering whether 'order by 1' is representative of a real sort, from the perspective of benchmarks. Better re-read http://www.postgresql.org/docs/8.1/static/sql-select.html#SQL-ORDERBY regards, tom lane ---(end of

Re: [HACKERS] PG qsort vs. Solaris

2006-10-03 Thread mark
Sorry. Stupid question. I didn't realize SQL allowed for the column to be identified by number. I've never seen that before. :-) Cheers, mark On Tue, Oct 03, 2006 at 06:47:35PM -0400, [EMAIL PROTECTED] wrote: On Tue, Oct 03, 2006 at 03:44:38PM -0400, Tom Lane wrote: select count(*) from

Re: [HACKERS] buildfarm failures in ECPG-Check

2006-10-03 Thread Tom Lane
Jeremy Drake [EMAIL PROTECTED] writes: It looks like something broke the ECPG-Check recently. A number of buildfarm members are failing. Looks like blow-back from the recent change in default GUC parameters. However, I think update the expected output is the wrong answer, because what we are

[HACKERS] cvsweb.cgi missing colors

2006-10-03 Thread Andrew Dunstan
What has our cvsweb.cgi recently lost its colors? It has made it almost completely unusable. Example: http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/misc/postgresql.conf.sample.diff?r1=1.195;r2=1.196;f=h cheers andrew ---(end of

Re: [HACKERS] [PATCHES] 7.4, 8.0 branches @ itanium2 icc

2006-10-03 Thread Sergey E. Koposov
On Tue, 3 Oct 2006, Tom Lane wrote: Sergey E. Koposov [EMAIL PROTECTED] writes: Having recently tried to build 7.4, and 8.0 branches on Itanium2 with ICC 7.4 is not going to work with ICC anyway without considerably more extensive changes (eg, configure hacking). It might make sense to

[HACKERS] pgindent has been run

2006-10-03 Thread Bruce Momjian
I have run pgindent for 8.2. -- Bruce Momjian [EMAIL PROTECTED] EnterpriseDBhttp://www.enterprisedb.com + If your life is a hard drive, Christ can be your backup. + ---(end of broadcast)--- TIP 3: Have you checked our extensive FAQ?

Re: [HACKERS] scripts/common.c minor memory leak

2006-10-03 Thread Guido Barosio
A good spot :) Sorry for being no{isy}{vice}{wbie}, but what does it means found by coverity ? g.- On 10/3/06, Martijn van Oosterhout kleptog@svana.org wrote: Just a minor thing. In yesno_prompt(), the value is resp is allocated memory that is never freed. File: src/bin/scripts/common.c

Re: [HACKERS] scripts/common.c minor memory leak

2006-10-03 Thread Walter Cruz
http://en.wikipedia.org/wiki/Coverity[]'s- WalterOn 10/3/06, Guido Barosio [EMAIL PROTECTED] wrote:A good spot :)Sorry for being no{isy}{vice}{wbie}, but what does it means found by coverity ?g.-On 10/3/06, Martijn van Oosterhout kleptog@svana.org wrote: Just a minor thing. In yesno_prompt(), the