[HACKERS] Array comparisons involving NULL

2005-11-27 Thread Michael Fuhr
Is there a built-in way to look for NULL array elements? I was thinking of something like NULL IS DISTINCT FROM ALL (array expression) but that doesn't work: test=> SELECT NULL IS DISTINCT FROM ALL (ARRAY[1, 2, 3]); ERROR: syntax error at or near "ALL" at character 30 LINE 1: SELECT NULL IS DIST

Re: [HACKERS] Using multi-row technique with COPY

2005-11-27 Thread Tom Lane
Simon Riggs <[EMAIL PROTECTED]> writes: > COPY FROM can read in sufficient rows until it has a whole block worth > of data, then get a new block and write it all with one pair of > BufferLock calls. > Comments? I don't see any way to do this without horrible modularity violations. The COPY code h

[HACKERS] Using multi-row technique with COPY

2005-11-27 Thread Simon Riggs
Since we just discussed using a multi-row per buffer lock technique with Seq Scans, it seems appropriate to discuss a similar technique with COPY FROM that I had been mulling over. COPY FROM can read in sufficient rows until it has a whole block worth of data, then get a new block and write it all

Re: [HACKERS] Strange interval arithmetic

2005-11-27 Thread Michael Fuhr
On Sun, Nov 27, 2005 at 08:45:18AM -0700, Michael Fuhr wrote: > Looks like the value is stuck at 2^31 - 1 seconds: I see this behavior back to at least 7.3. I'd guess it's because strtol() indicates overflow by returning LONG_MAX and setting errno to ERANGE, but the code doesn't check for that.

Re: [HACKERS] [Fwd: [PHP-CVS] cvs: php-src(PHP_5_1) /ext/pdo_pgsql package.xml pgsql_driver.c pgsql_statement.c php_pdo_pgsql_int.h]

2005-11-27 Thread Tom Lane
Christopher Kings-Lynne <[EMAIL PROTECTED]> writes: > Is Wez of the PHP project correct here in that you can't find parameter > types of statements via libpq? Per the description of PQprepare: : At present, there is no way to determine the actual data type inferred : for any parameters whose typ

Re: [HACKERS] PQfnumber() Fix Proposal

2005-11-27 Thread Tom Lane
Volkan YAZICI <[EMAIL PROTECTED]> writes: > Here's my proposal without breaking the current implementation: > [18: ] name + '\0' + lowercased_name Forget it --- this is proposing a protocol breakage in order to deal with libpq's internal mistake. It does not address the problem either; which str

Re: [HACKERS] Windows installation notes

2005-11-27 Thread Andreas Pflug
Magnus Hagander wrote: For pgadmin, one hint said "is the 8th July" instead of "8th of July" You'll have to talk to the pgadmin guys about that. Yup, teach 'em correct English :-) Fixed in svn. Regards, Andreas ---(end of broadcast)--- TIP

Re: [HACKERS] Strange interval arithmetic

2005-11-27 Thread Michael Fuhr
On Sun, Nov 27, 2005 at 11:15:04PM +0800, Christopher Kings-Lynne wrote: > What's going on here? Some sort of integer wraparound? [...] > test=# select interval '2378234234 seconds'; >interval > -- > 596523:14:07 > (1 row) Looks like the value is stuck at 2^31 - 1 seconds: test=

[HACKERS] Strange interval arithmetic

2005-11-27 Thread Christopher Kings-Lynne
What's going on here? Some sort of integer wraparound? WORKS = mysql=# select interval '2378 seconds'; interval -- 00:39:38 (1 row) mysql=# mysql=# select 2378 * interval '1 second'; ?column? -- 00:39:38 (1 row) DOESN'T WORK test=# select interval '237823

[HACKERS] [Fwd: [PHP-CVS] cvs: php-src(PHP_5_1) /ext/pdo_pgsql package.xml pgsql_driver.c pgsql_statement.c php_pdo_pgsql_int.h]

2005-11-27 Thread Christopher Kings-Lynne
Is Wez of the PHP project correct here in that you can't find parameter types of statements via libpq? Chris Original Message Subject: [PHP-CVS] cvs: php-src(PHP_5_1) /ext/pdo_pgsql package.xml pgsql_driver.c pgsql_statement.c php_pdo_pgsql_int.h Date: Fri, 25 Nov 2005 03:35

Re: [HACKERS] Windows installation notes

2005-11-27 Thread Christopher Kings-Lynne
If you don't give a password, the randomly generated one is ghastly. Not sure if this is a Windows thing or what, but it was definitely a strong password. Impossible to remember, and very difficult to write down and enter. It's not necessary to remember that password...

Re: [HACKERS] Windows installation notes

2005-11-27 Thread Magnus Hagander
> Not sure if this is the right place, but win32-hackers seems > to be dead. Yeah, it's been discontinued. > I recently had a chance to install PostgreSQL on Windows, and > wanted to share my comments on the experience in the hope of > making things better. > Overall I was very impressed - th

Re: [HACKERS] gprof SELECT COUNT(*) results

2005-11-27 Thread Christopher Kings-Lynne
Thinking more about other systems, ISTM that Oracle can do this, as can any MVCC based system. OTOH DB2 and SQLServer take block level read locks, so they can do this too, but at major loss of concurrency and threat of deadlock. Having said that, *any* system that chose not to do this would be sev

[HACKERS] PQfnumber() Fix Proposal

2005-11-27 Thread Volkan YAZICI
Related TODO paragraph: «Prevent PQfnumber() from lowercasing unquoted the column name. PQfnumber() should never have been doing lowercasing, but historically it has so we need a way to prevent it.» PQfnumber() Fix Proposal In the current version of PQfnumber(), i