Re: [PATCHES] AIX port current

2003-10-21 Thread Zeugswetter Andreas SB SD

> >   #include 
> > + #if defined(__CYGWIN__) || defined(WIN32)
> >   #include /* ensure O_BINARY is 
> > available */
> > + #endif
> 
> I don't feel that this will fly.  The comment on the #include line is
> hopelessly out of touch with reality --- if you check the list of
> symbols defined in fcntl.h you will find a bunch that are 
> used all over
> the place, eg SEEK_SET, O_RDONLY, O_CREAT, O_NDELAY, S_IRUSR.  Perhaps
> we could #include  in the various .c files that use these
> symbols rather than in c.h, but is that really a step 
> forward?  If there

(iirc the include was introduced with the windows port, no ?)
Actually, I think the files (at least from the main source) that need those symbols
have the include in the respective .c files, but ... 

> are any such .c files that also need the conflicting AIX header, we're
> still screwed.  Please propose another answer.  Or get AIX to fix their
> broken headers.

Since it is only dynloader.h and plpython.c that has dlfcn.h do you think a
patch that #undef's the offending symbols before the dlfcn.h include is ok,
or is an #ifndef _AIX in c.h better ?

Andreas

---(end of broadcast)---
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])


Re: [PATCHES] AIX port current

2003-10-21 Thread Tom Lane
"Zeugswetter Andreas SB SD" <[EMAIL PROTECTED]> writes:
>> I don't feel that this will fly.

> (iirc the include was introduced with the windows port, no ?)

Hmm, you are right; 7.3 c.h has

#ifdef __CYGWIN__
#include 
#include   /* ensure O_BINARY is available */
#endif

so actually there has never been an assumption that c.h would include
 generally.  Okay, objection withdrawn.

regards, tom lane

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


Re: [PATCHES] [HACKERS] obj_description problems?

2003-10-21 Thread Tom Lane
Christopher Kings-Lynne <[EMAIL PROTECTED]> writes:
> *sigh* - it's really not my day today.  Attached is patch that actually 
> compiles and fixes the problem.  We will need to bump CATVERSION, and 
> maybe should test all the other qualified functions?

I think you've identified a real issue, but how many of these modified
functions did you actually test?  I thought SUBSTRING was a reserved
word, for example ...

regards, tom lane

---(end of broadcast)---
TIP 7: don't forget to increase your free space map settings


Re: [PATCHES] pg_dump problems against 7.0

2003-10-21 Thread Bruce Momjian

Applied by Tom.  Thanks.

---

Christopher Kings-Lynne wrote:
> >>Doh.  Quite right.  Well, the 7.0 initdb creates pg_indexes as the last 
> >>thing it does.  (Even though there are higher oids in pg_attribute, 
> >>pg_rewrite and pg_description.), so how about the attached patch?
> > 
> > 
> > Seems reasonable, but the patch ought to fix the comment just above,
> > preferably with the above observation that this is correct by
> > examination of the now-frozen 7.0 initdb code ...
> 
> Attached.
> 
> Chris
> 

> Index: pg_dump.c
> ===
> RCS file: /projects/cvsroot/pgsql-server/src/bin/pg_dump/pg_dump.c,v
> retrieving revision 1.353
> diff -c -r1.353 pg_dump.c
> *** pg_dump.c 8 Oct 2003 03:52:32 -   1.353
> --- pg_dump.c 21 Oct 2003 01:17:58 -
> ***
> *** 5864,5870 
>   /*
>* findLastBuiltInOid -
>* find the last built in oid
> !  * we do this by looking up the oid of 'template1' in pg_database,
>* this is probably not foolproof but comes close
>   */
>   
> --- 5864,5871 
>   /*
>* findLastBuiltInOid -
>* find the last built in oid
> !  * we do this by assuming that the last thing the now-frozen 7.0.x initdb  
> !  * does is to create the pg_indexes view.
>* this is probably not foolproof but comes close
>   */
>   
> ***
> *** 5876,5882 
>   int last_oid;
>   
>   res = PQexec(g_conn,
> !   "SELECT oid from pg_database where datname = 'template1'");
>   if (res == NULL ||
>   PQresultStatus(res) != PGRES_TUPLES_OK)
>   {
> --- 5877,5883 
>   int last_oid;
>   
>   res = PQexec(g_conn,
> !   "SELECT oid FROM pg_class WHERE relname='pg_indexes'");
>   if (res == NULL ||
>   PQresultStatus(res) != PGRES_TUPLES_OK)
>   {

> 
> ---(end of broadcast)---
> TIP 6: Have you searched our list archives?
> 
>http://archives.postgresql.org

-- 
  Bruce Momjian|  http://candle.pha.pa.us
  [EMAIL PROTECTED]   |  (610) 359-1001
  +  If your life is a hard drive, |  13 Roberts Road
  +  Christ can be your backup.|  Newtown Square, Pennsylvania 19073

---(end of broadcast)---
TIP 9: the planner will ignore your desire to choose an index scan if your
  joining column's datatypes do not match


Re: [PATCHES] AIX port current

2003-10-21 Thread Tom Lane
"Zeugswetter Andreas SB SD" <[EMAIL PROTECTED]> writes:
> On AIX 4.3.2 dlfcn.h is not compatible with fcntl.h in the given constellat=
> ion
> (both define FREAD and FWRITE differently) and since fcntl.h in c.h is only=
>  needed=20
> for O_BINARY I suggest to include fcntl.h only if O_BINARY is needed.

> Second, LLONG_MIN (used in ecpg's misc.c) is not available on AIX.
> I am not sure whether the original has a typo there or not=20
> (using LONG_LONG_MIN instead of LONGLONG_MIN) (patch assumes no typo) ?

Patch committed.

regards, tom lane

---(end of broadcast)---
TIP 9: the planner will ignore your desire to choose an index scan if your
  joining column's datatypes do not match


Re: [PATCHES] AIX port current

2003-10-21 Thread Bruce Momjian

Applied by Tom.

---

Zeugswetter Andreas SB SD wrote:
> 
> On AIX 4.3.2 dlfcn.h is not compatible with fcntl.h in the given constellation
> (both define FREAD and FWRITE differently) and since fcntl.h in c.h is only needed 
> for O_BINARY I suggest to include fcntl.h only if O_BINARY is needed.
> 
> Second, LLONG_MIN (used in ecpg's misc.c) is not available on AIX.
> I am not sure whether the original has a typo there or not 
> (using LONG_LONG_MIN instead of LONGLONG_MIN) (patch assumes no typo) ?
> 
> Fix for both attached, please (consider to) apply.
> At least the second part of the patch has no risk, as far as I can see.
> 
> Andreas

Content-Description: aix_fcntl.patch

[ Attachment, skipping... ]

> 
> ---(end of broadcast)---
> TIP 6: Have you searched our list archives?
> 
>http://archives.postgresql.org

-- 
  Bruce Momjian|  http://candle.pha.pa.us
  [EMAIL PROTECTED]   |  (610) 359-1001
  +  If your life is a hard drive, |  13 Roberts Road
  +  Christ can be your backup.|  Newtown Square, Pennsylvania 19073

---(end of broadcast)---
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]


Re: [PATCHES] [HACKERS] obj_description problems?

2003-10-21 Thread Tom Lane
Christopher Kings-Lynne <[EMAIL PROTECTED]> writes:
> *sigh* - it's really not my day today.  Attached is patch that actually 
> compiles and fixes the problem.  We will need to bump CATVERSION, and 

Reviewed, tested, applied.

> maybe should test all the other qualified functions?

What other qualified functions?  There might possibly be some issues in
contrib stuff, but there are no other SQL-language functions defined in
the main system (except information_schema, which we already checked).

regards, tom lane

---(end of broadcast)---
TIP 8: explain analyze is your friend


Re: [PATCHES] [HACKERS] obj_description problems?

2003-10-21 Thread Christopher Kings-Lynne

*sigh* - it's really not my day today.  Attached is patch that actually 
compiles and fixes the problem.  We will need to bump CATVERSION, and 
maybe should test all the other qualified functions?
I think you've identified a real issue, but how many of these modified
functions did you actually test?  I thought SUBSTRING was a reserved
word, for example ...
Well, some...  I did run the regression tests and they passed, but I 
assumed that they would call all of the functions.

OK, I will test them all today and get back to you.

Chris



---(end of broadcast)---
TIP 7: don't forget to increase your free space map settings


Re: [PATCHES] [HACKERS] obj_description problems?

2003-10-21 Thread Christopher Kings-Lynne

Reviewed, tested, applied.
Thanks.

maybe should test all the other qualified functions?


What other qualified functions?  There might possibly be some issues in
contrib stuff, but there are no other SQL-language functions defined in
the main system (except information_schema, which we already checked).
Sorry - I meant "other functions that are now properly qualified in my 
patch".  ie, you have already tested them.

Chris

---(end of broadcast)---
TIP 9: the planner will ignore your desire to choose an index scan if your
 joining column's datatypes do not match


Re: [PATCHES] [HACKERS] obj_description problems?

2003-10-21 Thread Tom Lane
Christopher Kings-Lynne <[EMAIL PROTECTED]> writes:
> OK, I will test them all today and get back to you.

I checked them all before applying, but please do cross-check.  We're
close enough to release that double- and triple-checking patches is
called for.

regards, tom lane

---(end of broadcast)---
TIP 8: explain analyze is your friend


[PATCHES] more improvements to release notes

2003-10-21 Thread Neil Conway
This patch makes a bunch of improvements to the release notes. I only
modified release.sgml -- HISTORY will need to be regenerated.

I was able to remove almost all of the "Other uncategorized" release
note entries, but left a few that I wasn't sure what to do with. We
should remove this section, and move the remaining entries to other
sections if necessary.

I had a few questions on some of the entries:

What is the following release note entry supposed to mean? "FETCH 0"
doesn't "do nothing", it now fetches the current cursor row. Bruce,
could you clarify this please?

 * MOVE/FETCH 0 now does nothing; return value of MOVE/FETCH 1/0
   varies based on the current offset in the cursor

This entry is plainly wrong:

 * Cause FETCH 1 to return the current cursor row, or zero if at
   beginning/end of cursor, per SQL spec (Bruce)

FETCH 0 is what actually returns the current cursor row, and returning
"zero" when a row value is expected wouldn't make much sense. I've
changed it to just say:

 * Cause FETCH 0 to return the current cursor row, per SQL spec
(Bruce)

If I've missed some of the intent of the original entry, let me know.

These two entries are duplicates, right?

 * Have SHOW DATESTYLE generate output similar to that used by SET
   DATESTYLE (Tom)
 * Change DATESTYLE to output its value in a more common format
(Tom)

I wasn't sure, so I didn't make this change in the patch.

-Neil

Index: doc/src/sgml/release.sgml
===
RCS file: /var/lib/cvs/pgsql-server/doc/src/sgml/release.sgml,v
retrieving revision 1.215
diff -c -r1.215 release.sgml
*** doc/src/sgml/release.sgml	22 Oct 2003 05:09:12 -	1.215
--- doc/src/sgml/release.sgml	22 Oct 2003 06:18:20 -
***
*** 8,35 
   
Release 7.4
  
- 
- 
- 
  Overview
   Major changes in this release:
  
  
IPv6
  
   Full support for IPv6 connections and IPv6 address
--- 8,33 
   
Release 7.4
  
  Overview
   Major changes in this release:
  
  
+  Performance
+ 
+  IN/NOT IN subqueries are now much more efficient
+ 
+ 
+  Improved GROUP BY processing by using hash buckets
+ 
+  New multi-key hash join capability
+ 
+  ANSI joins are now better optimized
+ 
+  Faster and more powerful regular expression code
+ 
+  Function-inlining for simple SQL functions
+ 
+ 
IPv6
  
   Full support for IPv6 connections and IPv6 address
***
*** 50,57 
  
   Standards Compliance
  
!  Implement information schema Support for read-only
! transactions 
  
  Make cursors comply more closely with the SQL standard
  
--- 48,56 
  
   Standards Compliance
  
! Implement information schema
! 
! Support for read-only transactions 
  
  Make cursors comply more closely with the SQL standard
  
***
*** 65,86 
  and adds error codes, status information, a binary protocol, error
  reporting verbosity, and cleaner startup packets.
  
- 
-  Performance
- 
-  IN/NOT IN subqueries now perform as efficiently as
- joins
- 
-  Improved GROUP BY processing by using hash buckets
- 
-  New multi-key hash join capability
- 
-  ANSI joins are now better optimized
- 
-  Faster and more powerful regular expression code
- 
-  Function-inlining for simple SQL functions
- 

   Holdable Cursors
  
--- 64,69 
***
*** 116,122 
 in client applications and languages.
Error message wording has changed substantially in this release,
 and error codes have been added.
!   ANSI joins may behave differently because they are now better optimized
A number of server variables have been renamed for clarity
MOVE/FETCH 0 now does nothing; return value of MOVE/FETCH 1/0
 varies based on the current offset in the cursor
--- 99,105 
 in client applications and languages.
Error message wording has changed substantially in this release,
 and error codes have been added.
!   ANSI inner joins may behave differently because they are now better optimized
A number of server variables have been renamed for clarity
MOVE/FETCH 0 now does nothing; return value of MOVE/FETCH 1/0
 varies based on the current offset in the cursor
***
*** 156,162 
  Preserve free space information between postmaster restarts (Tom)
  Set proper schema permissions in initdb (Peter)
  Add start time to pg_stat_activity (Neil)
! New code to detect corrupt disk pages;  erase with zero_damaged_pages (Tom)
  New client/server protocol: faster, no username length limit, allow
clean exit from COPY (Tom)
  Add transaction status, tableid, columnid to backend protocol (Tom)
--- 139,145 
  Preserve free space information between postmaster restarts (Tom)
  Set proper schema permissions in initdb (Peter)
  Add start time to pg_stat_activity (Neil)
! New code to detect corrupt disk pages; erase with zero_damaged_pages (Tom)
  New client/server