Re: [HACKERS] Question about Parser()

2004-10-12 Thread Neil Conway
On Tue, 2004-10-12 at 08:13, Bin Liu wrote: > Can somebody explain how the 'parsetree' in the parser( ) function get > populated? What I saw is just a NIL. And it is not touched else where > in this file. "parsetree" is a global variable; it is defined in parser.c, but declared (via extern) in gra

Re: [HACKERS] PL/PgSQL for counting all rows in all tables.

2004-10-12 Thread Rod Taylor
> BTW The reason I'm asking about this is we're trying to come up with a good > scheme for phppgadmin to show estimated counts without showing incorrect > numbers to users... or at least giving them a clue that the numbers might be > really off. The vacuum daemon should know how far off the co

Re: [HACKERS] plans for bitmap indexes?

2004-10-12 Thread Gaetano Mendola
Josh Berkus wrote: Chris, The most nearly comparable thing is be the notion of "partial indexes," where, supposing you had 60 region codes (e.g. - 50 US states, 10 Canadian provinces), you might set up indices thus: I'm afraid that you're mistaken about the functionality of bitmap indexes. The

Re: [CYGWIN] [HACKERS] Need for DLLINIT in Makefile.shlib

2004-10-12 Thread Bruce Momjian
OK, I removed DLLINIT from Cygwin Makefile.shlib so it is now the same as Win32. I don't see any easy way to use ifeq to test multiple port strings so I didn't merge the duplicate Win32 and Cygwin Makefile actions. --- Rein

Re: [HACKERS] Required permissions for data directory

2004-10-12 Thread Andreas Pflug
Greg Stark wrote: "Joshua D. Drake" <[EMAIL PROTECTED]> writes: However, it is also true that by having the ability to give say a tier2 the ability to edit the postgresql.conf withough the ability to log in as postgres or root, then that user can not stop/start the database, or have root access. T

Re: [HACKERS] Required permissions for data directory

2004-10-12 Thread Greg Stark
"Joshua D. Drake" <[EMAIL PROTECTED]> writes: > However, it is also true that by having the ability to give say a tier2 the > ability to edit the postgresql.conf withough the ability to log in as postgres > or root, then that user can not stop/start the database, or have root access. > They can h

Re: [HACKERS] plans for bitmap indexes?

2004-10-12 Thread Tom Lane
Josh Berkus <[EMAIL PROTECTED]> writes: > The Bitmap index allows the query executor to use several indexes on > the same operation, comparing them and selecting rows where they > "overlap" like a Venn diagram. Note that what Josh is describing is not really a distinct index type, but a different

Re: [HACKERS] plans for bitmap indexes?

2004-10-12 Thread Greg Stark
Josh Berkus <[EMAIL PROTECTED]> writes: > SELECT * FROM people WHERE orientation = 'gay' AND gender = 'male' AND city = > 'San Francisco'; There are actually two TODOs here. 1) a "bitmap scan" that would be usable with any type of index. The tuple locations can be read in for each criteria

Re: [HACKERS] Hypothetical Indexes

2004-10-12 Thread Tom Lane
Marcos A Vaz Salles <[EMAIL PROTECTED]> writes: > In order to make index selection possible, we > have extended the PostgreSQL DBMS to allow the simulation of > hypothetical indexes. We believe these server extensions may be of > value for addition to the PostgreSQL code base. This would be of som

Re: [HACKERS] PL/PgSQL for counting all rows in all tables.

2004-10-12 Thread Andreas Pflug
Robert Treat wrote: Right-click the table object and select 'Count' on the current versions. Previously, iirc it showed the message 'Refresh table to count' in the actual count field, so you did a right-click -> Refresh. Maybe I didn't phrase that quite right. How would a user know that he needs t

Re: [HACKERS] open item: tablespace handing in pg_dump/pg_restore

2004-10-12 Thread Bruce Momjian
Magnus Hagander wrote: > > > > OK, I have applied the following patch that uses Cygwin native > > > > symlink() instead of the Win32 junctions. The reason for this is > > > > that Cygwin symlinks work on Win95/98/ME where junction points do > > > > not > > > > > > Is this really a Win95/98/ME

Re: [HACKERS] PL/PgSQL for counting all rows in all tables.

2004-10-12 Thread Robert Treat
On Tuesday 12 October 2004 03:22, Dave Page wrote: > > -Original Message- > > From: Robert Treat [mailto:[EMAIL PROTECTED] > > Sent: 11 October 2004 22:30 > > To: Dave Page > > Cc: [EMAIL PROTECTED] > > Subject: Re: [HACKERS] PL/PgSQL for counting all rows in all tables. > > > > How do you

Re: [HACKERS] Hypothetical Indexes

2004-10-12 Thread Dann Corbit
It seems to me to be a very valuable and interesting idea. (IBM has something similar) Probably, for production you do not want your optimizer puzzling about possible indexes. However, it would be a very valuable tool for the test environment. I can easily imagine a setting that allows the fe

Re: [HACKERS] plans for bitmap indexes?

2004-10-12 Thread Josh Berkus
Chris, > The most nearly comparable thing is be the notion of "partial > indexes," where, supposing you had 60 region codes (e.g. - 50 US > states, 10 Canadian provinces), you might set up indices thus: I'm afraid that you're mistaken about the functionality of bitmap indexes. The purpose of a

Re: [HACKERS] Required permissions for data directory

2004-10-12 Thread Joshua D. Drake
Tom Lane wrote: "Joshua D. Drake" <[EMAIL PROTECTED]> writes: Tom Lane wrote: Being able to edit postgresql.conf gives one the ability to become postgres (hint: you can cause the backend to load a shlib of your choosing, or even more trivially, adjust pg_hba.conf to let you in as superuser), so the

Re: [HACKERS] Cannot build latest snapshot under Mingw

2004-10-12 Thread Dann Corbit
> -Original Message- > From: Magnus Hagander [mailto:[EMAIL PROTECTED] > Sent: Tuesday, October 12, 2004 12:46 PM > To: Dann Corbit; [EMAIL PROTECTED] > Subject: SV: [HACKERS] Cannot build latest snapshot under Mingw > > > >dlltool --dllname postgres.exe --output-exp postgres.exp --def

Re: [HACKERS] Cannot build latest snapshot under Mingw

2004-10-12 Thread Magnus Hagander
>dlltool --dllname postgres.exe --output-exp postgres.exp --def >postgres.def >gcc -O2 -fno-strict-aliasing -Wall -Wmissing-prototypes >-Wmissing-declarations -L../../src/port -o postgres.exe >-Wl,--base-file,postgres.base postgres.exp access/SUBSYS.o >bootstrap/SUBSYS.o catalog/SUBSYS.o parser/S

Re: [HACKERS] Required permissions for data directory

2004-10-12 Thread Tom Lane
"Joshua D. Drake" <[EMAIL PROTECTED]> writes: > Tom Lane wrote: >> Being able to edit postgresql.conf gives one the ability to become >> postgres (hint: you can cause the backend to load a shlib of your >> choosing, or even more trivially, adjust pg_hba.conf to let you in >> as superuser), so the a

Re: [HACKERS] Required permissions for data directory

2004-10-12 Thread Tom Lane
Andrew Dunstan <[EMAIL PROTECTED]> writes: > Tom Lane wrote: >> Being able to edit postgresql.conf gives one the ability to become >> postgres (hint: you can cause the backend to load a shlib of your >> choosing, or even more trivially, adjust pg_hba.conf to let you in >> as superuser), so the abov

Re: [HACKERS] Required permissions for data directory

2004-10-12 Thread Joshua D. Drake
And can't we now even point to a completely different location for the actual data, as well as the rest of the config? I'd hate to think of someone changing that out from under me. We can do that in 8.0 can't we? Well then I guess it will be moot in about 6 months :) cheers andrew -- Comman

Re: [HACKERS] Two-phase commit

2004-10-12 Thread Heikki Linnakangas
On Wed, 6 Oct 2004, Tom Lane wrote: Quite some time ago, Heikki Linnakangas <[EMAIL PROTECTED]> wrote: I haven't received any comments and there hasn't been any discussion on the implementation, I suppose that nobody has given it a try. :( I finally got around to taking a close look at this. There

[HACKERS] Question about Parser()

2004-10-12 Thread Bin Liu
Can somebody explain how the 'parsetree' in the parser( ) function get populated? What I saw is just a NIL. And it is not touched else where in this file.   This file is src/backend/parser/parser.c   Thanks!   Bin   /* * parser *  Given a query in string form, and optionally info about *  pa

Re: [HACKERS] [BUGS] BUG #1270: stack overflow in thread in fe_getauthname

2004-10-12 Thread Peter Davie
Hi Tom, How many of these platforms you use are POSIX-compliant?  This information came from the POSIX web site (NOT THE DIGITAL/COMPAQ/HP/... WEBSITE).  Sysconf(_SC_GETPW_R_SIZE_MAX)  is supported by Solaris 2.5, SCO UNIX (circa 1999!),  Digital UNIX/Compaq Tru64 UNIX, FreeBSD,  AIX, HP-UX, a

Re: [HACKERS] Status ofTrigger Firing Order and 'FOR EACH STATEMENT'?

2004-10-12 Thread Dan Libby
Tom Lane wrote: Dan Libby <[EMAIL PROTECTED]> writes: Hi, I am running into a problem with changes in INSERT not showing up in outer level triggers (that call the INSERT, which has its own trigger). I think 8.0 will behave the way you want, but with so little detail it's hard to be sure.

Re: [HACKERS] compact PostgreSQL

2004-10-12 Thread Christopher Browne
In the last exciting episode, [EMAIL PROTECTED] (Yui Hiroaki) wrote: > I would like to install PostgreSQL. But my pc does not have much > space. So I would like to make compact PostgreSQL. Does anyone know > how to make compact PostgreSQL? For example, to make comment out > source code and compile

Re: [HACKERS] [BUGS] BUG #1270: stack overflow in thread in fe_getauthname

2004-10-12 Thread Peter Davie
Hi Guys, Please refer to : "[TSF] The getpwuid_r() function shall update the passwd structure pointed to by pwd and store a pointer to that structure at the location pointed to by result. The structure shall contain an entry from the user database with a matching uid. Storage referenced by t

Re: [HACKERS] Required permissions for data directory

2004-10-12 Thread Joshua D. Drake
Tom Lane wrote: "Joshua D. Drake" <[EMAIL PROTECTED]> writes: For 8.0 are we going to allow group modifications to the data directories for PostgreSQL? It is kind of silly that it must be 700. Not in the least. There are many systems where users by default are all in a "users" group, and so 770

Re: [HACKERS] plans for bitmap indexes?

2004-10-12 Thread Chris Browne
[EMAIL PROTECTED] (Yann Michel) writes: > On Fri, Oct 08, 2004 at 10:09:18AM +0100, Dave Page wrote: >> I think what Reini was asking was why do you think you need bitmap >> indexes as opposed to any existing type? > > due to I'm developing a datawarehousing application we have lots of > fact-data

[HACKERS] compact database

2004-10-12 Thread Yui Hiroaki
HI! (BI would like to compact PostgreSQL database. Do anyone know how to (Bcomapct database? Shoule comment out code of postgreSQL source? (B (BRegards, (Byui (B (B (B---(end of broadcast)--- (BTIP 5: Have you checked our extensive FAQ? (B

Re: [HACKERS] plans for bitmap indexes?

2004-10-12 Thread Chris Browne
[EMAIL PROTECTED] (Josh Berkus) writes: >> > Lots of people have talked about it but I don't know anyone coding it. > > I would love to have bitmap indexes in Postgres, as would a lot of other > community members. However, they are far from trivial to code. Are you > offering to help? I'm cur

[HACKERS] Two-phase commit patch updated

2004-10-12 Thread Heikki Linnakangas
I brought the 2PC patch up to date: http://www.hut.fi/~hlinnaka/pgsql/ There's no new functionality, I just fixed all the bit rot so that it applies to the current CVS tip. - Heikki ---(end of broadcast)--- TIP 2: you can get off all lists at once w

Re: [HACKERS] SQL-Invoked Procedures for 8.1

2004-10-12 Thread Gaetano Mendola
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Gavin Sherry wrote: | On Fri, 8 Oct 2004, Gaetano Mendola wrote: | | |>Gavin Sherry wrote: |> > On Wed, 6 Oct 2004, Josh Berkus wrote: |> > |> > [snip] |> > |> > |> >>Of course, this is as true of functions as it will be of procedures. So half |> >>the

[HACKERS] Hypothetical Indexes

2004-10-12 Thread Marcos A Vaz Salles
Hello, I have just finished my M.Sc. thesis at Pontifícia Universidade Católica do Rio de Janeiro (PUC-Rio), Brazil, and we have developed a research prototype for automatic index selection using a software agent in PostgreSQL. In order to make index selection possible, we have extended the Post

Re: [HACKERS] Two-phase commit

2004-10-12 Thread Heikki Linnakangas
On Thu, 7 Oct 2004, Oliver Jowett wrote: Probably the next question is, do we want a database-side timeout on how long prepared txns can stay alive before being summarily rolled back? That sounds very dangerous to me. You could end up breaking global atomicity if some other resource in the global

Re: [HACKERS] Two-phase commit

2004-10-12 Thread Heikki Linnakangas
On Thu, 7 Oct 2004, Zeugswetter Andreas DAZ SD wrote: Note that this is only really necessary because of Heikki's choice to make the API work in terms of a user-assigned GID. This was not an arbitrary choice, but is required by most/all TX managers :-( I agree that it would be cleaner for the tx ma

Re: [HACKERS] Required permissions for data directory

2004-10-12 Thread Andrew Dunstan
Tom Lane wrote: Being able to edit postgresql.conf gives one the ability to become postgres (hint: you can cause the backend to load a shlib of your choosing, or even more trivially, adjust pg_hba.conf to let you in as superuser), so the above distinction is unenforceable. And can't we now even

Re: [HACKERS] Strange code in initdb

2004-10-12 Thread Tom Lane
Peter Eisentraut <[EMAIL PROTECTED]> writes: > Shouldn't the second progname be argv[0] or something else that contains > the full path? argv[0] doesn't necessarily contain the full path. Is it worth calling find_my_exec() here to produce an absolute path? Possibly... r

Re: [HACKERS] Required permissions for data directory

2004-10-12 Thread Tom Lane
"Joshua D. Drake" <[EMAIL PROTECTED]> writes: > For 8.0 are we going to allow group modifications to the data > directories for PostgreSQL? It is kind of silly that it must be 700. Not in the least. There are many systems where users by default are all in a "users" group, and so 770 isn't much s

[HACKERS] Required permissions for data directory

2004-10-12 Thread Joshua D. Drake
Hello, For 8.0 are we going to allow group modifications to the data directories for PostgreSQL? It is kind of silly that it must be 700. I think we should allow at least 770. This allows you to have administrators with postgresql.conf editing rights without giving them the ability to su to postg

[HACKERS] Strange code in initdb

2004-10-12 Thread Peter Eisentraut
What is this trying to tell us? if (ret == -1) fprintf(stderr, _("The program \"postgres\" is needed by %s " "but was not found in the same directory as \"%s\".\n" "Check your insta

[HACKERS] Cannot build latest snapshot under Mingw

2004-10-12 Thread Dann Corbit
dlltool --dllname postgres.exe --output-exp postgres.exp --def postgres.def gcc -O2 -fno-strict-aliasing -Wall -Wmissing-prototypes -Wmissing-declarations -L../../src/port -o postgres.exe -Wl,--base-file,postgres.base postgres.exp access/SUBSYS.o bootstrap/SUBSYS.o catalog/SUBSYS.o parser/SUBSYS.

Re: [CYGWIN] [HACKERS] Need for DLLINIT in Makefile.shlib

2004-10-12 Thread Reini Urban
Jason Tishler schrieb: On Tue, Oct 12, 2004 at 01:37:48AM +0200, Reini Urban wrote: Bruce Momjian schrieb: I am curious why Cygwin needs DLLINIT in Makefile.shlib, and Win32 doesn't: [snip] The only difference I see is that Cygwin uses $(DLLINIT) while Win32 does not. Is that correct? Why

Re: [HACKERS] postgres vulnerability

2004-10-12 Thread Stephan Szabo
On Tue, 12 Oct 2004, Dave Cramer wrote: > Actually, I see this differently. > > This is a classic example of how postgreSQL is viewed by the rest of the > world. This argument has been brought up before. > It is only the core that differentiates the server from the interfaces. > The rest of the w

Re: [HACKERS] CVS fixed ...

2004-10-12 Thread Reini Urban
Tom Lane schrieb: CVS PostgreSQL Server CVS web interface. PostgreSQL Interfaces CVS web interface. CVS repository retrieval The first of these needs to be repointed to .../pgsql, and the second is (I think) entirely dead. When you "fixed" pgsql-server to pgsql, cannot you leave the old pgsql-

Re: [HACKERS] open item: tablespace handing in pg_dump/pg_restore

2004-10-12 Thread Reini Urban
Bruce Momjian schrieb: Greg Stark wrote: Bruce Momjian <[EMAIL PROTECTED]> writes: OK, I have applied the following patch that uses Cygwin native symlink() instead of the Win32 junctions. The reason for this is that Cygwin symlinks work on Win95/98/ME where junction points do not Is this really a

Re: [HACKERS] postgres vulnerability

2004-10-12 Thread Dave Cramer
Actually, I see this differently. This is a classic example of how postgreSQL is viewed by the rest of the world. This argument has been brought up before. It is only the core that differentiates the server from the interfaces. The rest of the world views this as one product. Dave On Sun, 2004-1

Re: [HACKERS] CVS fixed ...

2004-10-12 Thread Marc G. Fournier
Fixed ... On Tue, 12 Oct 2004, Heikki Linnakangas wrote: On Mon, 11 Oct 2004, Marc G. Fournier wrote: Also, the link to cvsweb interface at http://developer.postgresql.org/ broke. How so? I just wwent to the link and everything appears fine to me ... There's a link to "PostgreSQL Server CVS web i

Re: [HACKERS] Making rpath a bit more flexible

2004-10-12 Thread Andrew Dunstan
Peter Eisentraut wrote: Am Montag, 11. Oktober 2004 22:31 schrieb Tom Lane: The problem of course is that we have no rpath pointing to the place where libperl.so lives. (Now that I look, the only reason this worked before was that I had /usr/lib/perl5/5.8.0/i386-linux-thread-multi/CORE mention

Re: [HACKERS] Making rpath a bit more flexible

2004-10-12 Thread Tom Lane
Peter Eisentraut <[EMAIL PROTECTED]> writes: >> What I would like to do about this is change the platform-specific >> makefiles to provide these macros in the form >> rpath = -Wl,-rpath,$(rpathdir) > I have no problem with that. But are there going to be cases where we > need to point to more tha

Re: [HACKERS] open item: tablespace handing in pg_dump/pg_restore

2004-10-12 Thread Greg Stark
"Magnus Hagander" <[EMAIL PROTECTED]> writes: > No, it's file system. > Junctions will not work on NT OS:es with FAT32. > Directory junctions require NTFSv5, which is only available on Windows > 2000 and newer. So then there really has to be a run-time check for this. Either at initdb time, or a

Re: [CYGWIN] [HACKERS] Need for DLLINIT in Makefile.shlib

2004-10-12 Thread Jason Tishler
On Tue, Oct 12, 2004 at 01:37:48AM +0200, Reini Urban wrote: > Bruce Momjian schrieb: > >I am curious why Cygwin needs DLLINIT in Makefile.shlib, and Win32 > >doesn't: > > > > [snip] > > > >The only difference I see is that Cygwin uses $(DLLINIT) while Win32 > >does not. Is that correct? Why?

Re: [HACKERS] open item: tablespace handing in pg_dump/pg_restore

2004-10-12 Thread Magnus Hagander
> > > OK, I have applied the following patch that uses Cygwin native > > > symlink() instead of the Win32 junctions. The reason for this is > > > that Cygwin symlinks work on Win95/98/ME where junction points do > > > not > > > > Is this really a Win95/98/ME vs NT distinction or a FAT32 > vs

Re: [HACKERS] PL/PgSQL for counting all rows in all tables.

2004-10-12 Thread Dave Page
> -Original Message- > From: Robert Treat [mailto:[EMAIL PROTECTED] > Sent: 11 October 2004 22:30 > To: Dave Page > Cc: [EMAIL PROTECTED] > Subject: Re: [HACKERS] PL/PgSQL for counting all rows in all tables. > > How do you handle table growth that makes the reltuples value > out of w