[GENERAL] CMS with PostgreSQL

2003-12-07 Thread George Essig
> Anyone know of an open source (BSD, GPL) Content Managment System > written in > PHP that will use PostgreSQL, or at least use PEAR::DB or any other DB > abstraction layer API? > > -- > select 'mmarques' || '@' || 'unl.edu.ar' AS email; > -

Re: Triggers, Stored Procedures, PHP. was: Re: [GENERAL] PostgreSQL

2003-12-07 Thread Joshua D. Drake
You don't have to disagree with me, I can have arguments with myself over nothing. Some would call that insanity, I call it genius. Sincerely, Joshua D. Drake -- Command Prompt, Inc., home of Mammoth PostgreSQL - S/ODBC - S/JDBC Postgresql support, programming, shared hosting and dedicated h

Re: [GENERAL] pg_hba.conf change in 7.4

2003-12-07 Thread Bruce Momjian
Seum-Lim Gan wrote: > Hi Bruce, > > I tried to newly compiled 7.4 with HAVE_IPV6 commented out > in /src/include/pg_config.h. > > After that I tried psql: > > psql -U scncraft -h localhost > psql: FATAL: no pg_hba.conf entry for host "::1", user "scncraft", > database "A" > > This happens the

Re: [GENERAL] pg_hba.conf change in 7.4

2003-12-07 Thread Bruce Momjian
Yes, I am not suspecting that there is something strange with that Solaris installation. Maybe everything is IPv6. We certainly have lots of Solaris users. Are all Solaris connections coming in as IPv6? That seems impossible because we didn't support IPv6 in PostgreSQL 7.3 and it worked fine.

Re: [GENERAL] GRANT ON C

2003-12-07 Thread Tom Lane
Martin Marques <[EMAIL PROTECTED]> writes: > Is the postgres super-user the only one that can create functions with > LANGUAGE C? Yes. Since there's no way to constrain what a C function does, it would be silly to imagine that a non-superuser wouldn't own the database if he could create C functio

Re: [GENERAL] GRANT ON C

2003-12-07 Thread Doug McNaught
Martin Marques <[EMAIL PROTECTED]> writes: > Is the postgres super-user the only one that can create functions > with LANGUAGE C? Yes, because a C function can basically do anything it wants to with the privileges of the 'postgres' user. So you have to create the function as superuser, but you o

Re: [GENERAL] GRANT ON C

2003-12-07 Thread Oliver Elphick
On Sun, 2003-12-07 at 20:00, Martin Marques wrote: > I'm trying to load the pgcypto.sql file from the contrib in a database and > I've hit a problem which I never had in the past (maybe never did it this > way): when I try to load this file (psql -f) with a specific user, which is > not the post

Re: [GENERAL] user defined variable per session

2003-12-07 Thread Oliver Elphick
On Sun, 2003-12-07 at 19:57, Claudio Lapidus wrote: > > I need to create user defined variable in every database session. > > In Sybase ASA is equivalent: > > CREATE VARIABLE name TYPE; > > > > I need use this in views. Is it possible??? > > What about > > test=> \set myvar 5 > test=> select :my

Re: [GENERAL] GRANT ON C

2003-12-07 Thread Martin Marques
El Dom 07 Dic 2003 17:10, Doug McNaught escribió: > Martin Marques <[EMAIL PROTECTED]> writes: > > > Is the postgres super-user the only one that can create functions > > with LANGUAGE C? > > Yes, because a C function can basically do anything it wants to with > the privileges of the 'postgres' u

[GENERAL] GRANT ON C

2003-12-07 Thread Martin Marques
I'm trying to load the pgcypto.sql file from the contrib in a database and I've hit a problem which I never had in the past (maybe never did it this way): when I try to load this file (psql -f) with a specific user, which is not the postgres super-user I get a permission denied, and couldn't fin

Re: [GENERAL] user defined variable per session

2003-12-07 Thread Claudio Lapidus
> I need to create user defined variable in every database session. > In Sybase ASA is equivalent: > CREATE VARIABLE name TYPE; > > I need use this in views. Is it possible??? What about test=> \set myvar 5 test=> select :myvar; ?column? -- 5 (1 row) hth cl. --

Re: [GENERAL] postgresql locks the whole table!

2003-12-07 Thread Greg Stark
Stephan Szabo <[EMAIL PROTECTED]> writes: > In addition, how should the locks be granted for a sequence like: > T1: get shared lock on row A > T2: get exclusive lock on row A > T3: get shared lock on row A > Does T3 get the lock or not? If it does, then you have the possibility of > freezing ou

Re: [GENERAL] pg_hba.conf change in 7.4

2003-12-07 Thread Joshua D. Drake
Hello, Also solaris has an option to not use IPV6 at least with Solaris 9. When we installed it it asked us if we wanted IPV6 support. We just said no. Sincerely, Joshua D. Drake Seum-Lim Gan wrote: Hi Bruce, Thanks for the recommendation. I will edit the pg_config.h file and comment out th

Re: [GENERAL] postgresql locks the whole table!

2003-12-07 Thread Stephan Szabo
On Sun, 7 Dec 2003, Greg Stark wrote: > It's not strictly necessary to have a list of all xids at all. The normal > "shared read lock" is just "take the write lock, increment the readers > counter, unlock" Anyone who wants to write has to wait (using, eg, a condition > variable) until the readers

Re: [GENERAL] postgresql locks the whole table!

2003-12-07 Thread Tom Lane
> Greg Stark wrote: >> This gets the right semantics but without the debugging info of a list of >> lockers. Other than debugging the only advantage I see to having the list of >> lockers is for deadlock detection. Is that absolutely mandatory? No, deadlock detection is not optional. Mike Mascari

Re: [GENERAL] postgresql locks the whole table!

2003-12-07 Thread Mike Mascari
Greg Stark wrote: > It's not strictly necessary to have a list of all xids at all. The normal > "shared read lock" is just "take the write lock, increment the readers > counter, unlock" Anyone who wants to write has to wait (using, eg, a condition > variable) until the readers count goes to 0. > >

Re: [GENERAL] postgresql locks the whole table!

2003-12-07 Thread Greg Stark
It's not strictly necessary to have a list of all xids at all. The normal "shared read lock" is just "take the write lock, increment the readers counter, unlock" Anyone who wants to write has to wait (using, eg, a condition variable) until the readers count goes to 0. This gets the right semantic

Re: [GENERAL] CREATE RULE problem/question requesting workaround

2003-12-07 Thread Tom Lane
Chris Travers <[EMAIL PROTECTED]> writes: > Adding every table as a view is not going to be likely to be feasible > since it will involve a major maintenance nightmare. Depending on > requirements, we may look at allowing most of the database to be > readable to all users, but this is not ideal an

Re: [GENERAL] CREATE RULE problem/question requesting workaround

2003-12-07 Thread Chris Travers
On Mon, 2003-12-08 at 00:46, Tom Lane wrote: > Chris Travers <[EMAIL PROTECTED]> writes: > > Is there any way to try to enforce a rewrite > > rule in such a away as to do the select query as normal, but if > > necessary raise an exception (to abort the select)? > > No. > > You need to rethink you

Re: [GENERAL] CREATE RULE problem/question requesting workaround

2003-12-07 Thread Tom Lane
Chris Travers <[EMAIL PROTECTED]> writes: > Is there any way to try to enforce a rewrite > rule in such a away as to do the select query as normal, but if > necessary raise an exception (to abort the select)? No. You need to rethink your permissions design. One idea that you *can* make work is t

Re: [GENERAL] user defined variable per session

2003-12-07 Thread Michael Glaesemann
On Sunday, December 7, 2003, at 11:38 PM, Miso Hlavac wrote: Hello, I need to create user defined variable in every database session. In Sybase ASA is equivalent: CREATE VARIABLE name TYPE; I need use this in views. Is it possible??? Would it be possible to use a temp (very simple) temp table to

Re: [GENERAL] pg_hba.conf change in 7.4

2003-12-07 Thread Seum-Lim Gan
Hi Bruce, I tried to newly compiled 7.4 with HAVE_IPV6 commented out in /src/include/pg_config.h. After that I tried psql: psql -U scncraft -h localhost psql: FATAL: no pg_hba.conf entry for host "::1", user "scncraft", database "A" This happens the same way whether I have this line in pg_hba.

Re: [GENERAL] last update time of a table

2003-12-07 Thread Claudio Lapidus
pg wrote: > I have some pulldown menus in a VB app which extract data > from a remote site with slow connection. And the data in those tables for > pulldowns changes rarely. So if the pulldown has to extract the data and > transmit it thru slow connection, the pulldown will take a few seconds to be

Re: [GENERAL] pg_hba.conf change in 7.4

2003-12-07 Thread Seum-Lim Gan
Hi Bruce, I am rebuilding now and noticed some error that I may have missed since the last time I build 7.4. Essentially the postmaster, bin, lib have been built and server is able to start and I am able to create a new DB and etc. Will let you know if the commenting out the HAVE_IPV6 will work. M

[GENERAL] user defined variable per session

2003-12-07 Thread Miso Hlavac
Hello, I need to create user defined variable in every database session. In Sybase ASA is equivalent: CREATE VARIABLE name TYPE; I need use this in views. Is it possible??? thanx, miso ---(end of broadcast)--- TIP 3: if posting/reading through Us

Re: [GENERAL] functions/operators with 2 sets as arguments

2003-12-07 Thread Jochem van Dieten
Tom Lane wrote: Jochem van Dieten <[EMAIL PROTECTED]> writes: While trying to create an operator to test if 2 intervals overlap, I ran into the following limitation: ERROR: Functions and operators can take only one set argument (PostgreSQL 7.3.2 on OpenBSD) It's still there, and is unlikely to

[GENERAL] CREATE RULE problem/question requesting workaround

2003-12-07 Thread Chris Travers
Hi all; I am using PostgreSQL 7.4 on RedHat 9, though I don't think that is important to this problem. I am attempting to write a rule that will check to see whether certain conditions are right for a SELECT query and abort the query of those connections are not right. In this case, I am trying

Re: [GENERAL] postgresql locks the whole table!

2003-12-07 Thread Bruce Momjian
Jeff Davis wrote: > The way I understand it, is that you're having trouble storing all of > the xids in the row; right now you just store one and mark it "locked". > If you were able to store several, but not necessarily all xids in all > cases, wouldn't that be a big improvement? The xids not in t

Re: [GENERAL] postgresql locks the whole table!

2003-12-07 Thread Jeff Davis
> As I remember the implementation problem is that we do an exclusive row > lock right now by putting the transaction id on the row and set a > special row-lock bit in the tuple. Shared locks need to store multiple > transaction ids, and that is where we are stuck. Shared memory is of > finite s

Re: [GENERAL] CMS with PostgreSQL

2003-12-07 Thread Jason Tesser
> Anyone know of an open source (BSD, GPL) Content Managment System written in > PHP that will use PostgreSQL, or at least use PEAR::DB or any other DB > abstraction layer API? I am currently writing one for use with Python and Postgres as I feel this is the best way to go. I am using mod_pyhto