Re: [PATCHES] initdb in C

2003-11-08 Thread Andrew Dunstan
Tom Lane wrote: Bruce Momjian [EMAIL PROTECTED] writes: It passes all the regression tests. I have also included a diff against Andrew's version so you can see my changes. It seems Andrew had a very current version of initdb. The only update he missed was the change to test the number of

Re: [PATCHES] initdb in C

2003-11-08 Thread Andrew Dunstan
Bruce Momjian wrote: It passes all the regression tests. I have also included a diff against Andrew's version so you can see my changes. It seems Andrew had a very current version of initdb. The only update he missed was the change to test the number of connections before shared buffers ---

Re: [PATCHES] alter schema help is not available in psql

2003-11-08 Thread Peter Eisentraut
Kris Jurka writes: in psql \h alter schema does not produce the desired help because the sgml doc has the incorrect refmiscinfo tag so it does not get picked up by the create_help.pl script. Thanks for the reminder. Patch installed. -- Peter Eisentraut [EMAIL PROTECTED]

Re: [PATCHES] initdb in C

2003-11-08 Thread Andrew Dunstan
Bruce Momjian wrote: Here is a slightly modified version of Andrew's great work in making a C version of initdb. Other than minor cleanups, the only big change was to remove rmdir handling because we using rm -r and rmdir /s in commands/dbcommands.c, so we might as use the same thing for

Re: [pgsql-hackers-win32] [PATCHES] initdb in C

2003-11-08 Thread Bruce Momjian
Andrew Dunstan wrote: Tom Lane wrote: Bruce Momjian [EMAIL PROTECTED] writes: It passes all the regression tests. I have also included a diff against Andrew's version so you can see my changes. It seems Andrew had a very current version of initdb. The only update he missed was

Re: [pgsql-hackers-win32] [PATCHES] initdb in C

2003-11-08 Thread Andrew Dunstan
Bruce Momjian wrote: Yes, I was concerned too that everything was in there. I checked the initdb.sh logs and found that the only thing not added was the checking of the max number of connections before checking the max number of buffers, which I added. The other stuff was in there. I also

Re: [PATCHES] [pgsql-hackers-win32] initdb in C

2003-11-08 Thread Bruce Momjian
Andrew Dunstan wrote: Bruce Momjian wrote: Here is a slightly modified version of Andrew's great work in making a C version of initdb. Other than minor cleanups, the only big change was to remove rmdir handling because we using rm -r and rmdir /s in commands/dbcommands.c, so we might

Re: [PATCHES] alter schema help is not available in psql

2003-11-08 Thread Bruce Momjian
Thanks, I was just getting to this today, but Peter has applied it. Thanks. --- Kris Jurka wrote: Repost: On Tue, 4 Nov 2003, Kris Jurka wrote: in psql \h alter schema does not produce the desired help because

Re: [PATCHES] initdb in C

2003-11-08 Thread Peter Eisentraut
Andrew Dunstan writes: recreating the datadir if we didn't create it initially should be OK in that case, and it makes the code simpler. That should be avoided, because you'll have trouble recreating the original directory with all its properties such as ownership, permissions, etc., at least

Re: [PATCHES] [pgsql-hackers-win32] initdb in C

2003-11-08 Thread Andrew Dunstan
Bruce Momjian wrote: Andrew Dunstan wrote: My comments: I have no problem with shelling out to rmdir - although my goal was to avoid shelling out to anything other than postgres itself. I think recreating the datadir if we didn't create it initially should be OK in that case, and it

Re: [PATCHES] initdb in C

2003-11-08 Thread Tom Lane
Peter Eisentraut [EMAIL PROTECTED] writes: Andrew Dunstan writes: recreating the datadir if we didn't create it initially should be OK in that case, and it makes the code simpler. That should be avoided, because you'll have trouble recreating the original directory with all its properties

[PATCHES] ALTER TABLE modifications

2003-11-08 Thread Rod Taylor
A general re-organization of Alter Table. Node wise, it is a AlterTableStmt with a list of AlterTableCmds. The Cmds are the individual actions to be completed (Add constraint, drop constraint, add column, etc.) Processing is done in 2 phases. The first phase updates the system catalogs and

Re: [PATCHES] initdb in C

2003-11-08 Thread Bruce Momjian
Tom Lane wrote: Peter Eisentraut [EMAIL PROTECTED] writes: Andrew Dunstan writes: recreating the datadir if we didn't create it initially should be OK in that case, and it makes the code simpler. That should be avoided, because you'll have trouble recreating the original directory

Re: [PATCHES] initdb in C

2003-11-08 Thread Bruce Momjian
Peter Eisentraut wrote: Andrew Dunstan writes: recreating the datadir if we didn't create it initially should be OK in that case, and it makes the code simpler. That should be avoided, because you'll have trouble recreating the original directory with all its properties such as

Re: [PATCHES] initdb in C

2003-11-08 Thread Tom Lane
Bruce Momjian [EMAIL PROTECTED] writes: Consider also the strong likelihood that the data directory's parent directory is owned by root, Again, this directory recreate happens only on Win32, an I thought it would be OK there. Windows has no concept of directory permissions at all? I thought

Re: [PATCHES] initdb in C

2003-11-08 Thread Tom Lane
Bruce Momjian [EMAIL PROTECTED] writes: Recreating the directory only happens on WIN32, where rmdir doesn't allow you to only delete files and subdirectories and not the parent directory. Non-Win32 does rm -rf dir/*. I think we should forget about invoking rm as a subprocess at all, and just

Re: [PATCHES] initdb in C

2003-11-08 Thread Bruce Momjian
Tom Lane wrote: Bruce Momjian [EMAIL PROTECTED] writes: Consider also the strong likelihood that the data directory's parent directory is owned by root, Again, this directory recreate happens only on Win32, an I thought it would be OK there. Windows has no concept of directory

Re: [PATCHES] initdb in C

2003-11-08 Thread Bruce Momjian
Tom Lane wrote: Bruce Momjian [EMAIL PROTECTED] writes: Recreating the directory only happens on WIN32, where rmdir doesn't allow you to only delete files and subdirectories and not the parent directory. Non-Win32 does rm -rf dir/*. I think we should forget about invoking rm as a

Re: [PATCHES] [pgsql-hackers-win32] initdb in C

2003-11-08 Thread Bruce Momjian
Andrew Dunstan wrote: Good. I can do rmdir() in C in port/dirmod.c if we need it. Right now we are doing system(rm/rmdir) in dbcommands.c so we should consistent. Let's stay with system(rm/rmdir) and if it doesn't work as we expect, we can add your rmdir() code and put it in port/dirmod.c.

Re: [PATCHES] initdb in C

2003-11-08 Thread Bruce Momjian
Also, I see this at the top of the code: * author: Andrew Dunstan mailto:[EMAIL PROTECTED] * * Copyright (C) 2003 Andrew Dunstan * Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of

Re: [PATCHES] initdb in C

2003-11-08 Thread Andrew Dunstan
Tom Lane wrote: Bruce Momjian [EMAIL PROTECTED] writes: Consider also the strong likelihood that the data directory's parent directory is owned by root, Again, this directory recreate happens only on Win32, an I thought it would be OK there. Windows has no concept of directory

Re: [PATCHES] initdb in C

2003-11-08 Thread Andrew Dunstan
Bruce Momjian wrote: Also, I see this at the top of the code: * author: Andrew Dunstan mailto:[EMAIL PROTECTED] * * Copyright (C) 2003 Andrew Dunstan * Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group * Portions

Re: [PATCHES] [pgsql-hackers-win32] initdb in C

2003-11-08 Thread Andrew Dunstan
Bruce Momjian wrote: I ran some tests using XP CMD and found: C:\test and \test works but: test does not work. Since I see that the output always has a leading path, On Windows, pgpath is guaranteed to be a full path (see call to expanded_path() ) exactly so it works

Re: [PATCHES] [pgsql-hackers-win32] initdb in C

2003-11-08 Thread Bruce Momjian
Andrew Dunstan wrote: Andrew Dunstan wrote: The problem with this is that you now have 2 quoted strings. I take this back. You *can* have multiple quoted strings on the command line - it just doesn't work in popen() because it uses the /C flag. Oh, OK, that's good. --

Re: [PATCHES] equal() perf tweak

2003-11-08 Thread Tom Lane
Neil Conway [EMAIL PROTECTED] writes: Interesting. I've heard in some shops it is standard policy to order the fields in all structs by their descending sizes (making allowances for platform-specific variations), so as to reduce padding. Do you think it would be worthwhile to systematically

Re: [PATCHES] Patch 7.4RC1 pgtcl to restore Tcl-8.0 compatibility for large obj fix

2003-11-08 Thread Tom Lane
ljb [EMAIL PROTECTED] writes: Here's the patch to restore libpgtcl compatibility with Tcl-8.0, which was lost in 7.4RC1 with my other patch to fix corrupt binary large-object reads and writes. This patch is against PostgreSQL-7.4RC1. Applied. Many thanks for double-checking it.

[PATCHES] sigpipe handling

2003-11-08 Thread Manfred Spraul
Attatched is the latest version of my patch that makes the signal(SIG_PIPE, SIG_IGN) calls around the send() syscall conditional: they are not sufficient to ensure that multithreaded libpq users are not killed by SIGPIPE signals, and they cause a noticable slowdown. I've switched to a global

Re: [PATCHES] [pgsql-hackers-win32] WIN32_DEV CVS branch

2003-11-08 Thread Marc G. Fournier
removed, and files from ftp have also been removed ... On Sat, 8 Nov 2003, Bruce Momjian wrote: We are no longer using the WIN32_DEV CVS branch. We are doing all Win32 work in HEAD now. I have already moved any WIN32_DEV changes up into HEAD. I have updated the Win32 web page to indicate

Re: [PATCHES] [HACKERS] BEGIN vs START TRANSACTION

2003-11-08 Thread Bruce Momjian
Gaetano Mendola wrote: Hi all, why START TRANSACTION READ ONLY is allowed and not BEGIN READ ONLY ? Seems it should be allowed so that BEGIN and START TRANSACTION behave the same. In fact, the BEGIN manual page says: xref linkend=sql-start-transaction

Re: [PATCHES] pg_autovacuum README patch

2003-11-08 Thread Bruce Momjian
Yes, I have reverted the lines outlined below and am attaching the patch. --- Gaetano Mendola wrote: Gaetano Mendola wrote: ---

Re: [PATCHES] make check improvement for cygwin

2003-11-08 Thread Bruce Momjian
Patch applied to 7.4 and HEAD. Thanks. --- Christopher Kings-Lynne wrote: I have attached a more comprehensive MSWIN FAQ patch. Basically, the instructions were way out of date and incorrect. Installing Postgres