Re: [GENERAL] A question about PL/pgSQL

2000-10-30 Thread K Parker
Doesn't the following allow a race condition? >declare foo record; >begin > select into foo * from overview... > if not found > insert... > else ... > end if; >end; ISTM 2 or more clients could attempt to insert the same row, based on the select failing, if all were issued at the same time.

Re: [GENERAL] phpPgAdmin

2000-10-26 Thread K Parker
>You may want to use persistent connections, also. Almost certainly you don't. The discussion sites are full of complaints that it doesn't work properly. There is a tendency for the connections to not get reused, but not released, either, such that you quickly run out of connections. This is

Re: [GENERAL] phpPgAdmin

2000-10-24 Thread K Parker
The answer is easy, but not welcome. The PHP you are using was compiled without PostgreSQL support. It must be recompiled to include it. Join 18 million Eudora users by signing up for a free Eudora Web-Mail account at http://www.eudoramail.com

Re: [GENERAL] phpPgAdmin

2000-10-24 Thread K Parker
The answer is easy, but not welcome. The PHP you are using was compiled without PostgreSQL support. It must be recompiled to include it. Join 18 million Eudora users by signing up for a free Eudora Web-Mail account at http://www.eudoramail.com

[GENERAL] Re: My New Job

2000-10-10 Thread K Parker
>> It's not like Great Bridge >> wants to turn PostgreSQL >> into a pinball machine emulator. > All right, who leaked the Great Bridge > product plans. :-) Somebody was bound to. We all agree that what the world really needs is a Great Pinball Machine Emulator--it's just that we want there to

[GENERAL] Re: URL Type

2000-10-06 Thread K Parker
> My interpretation would be that if the > consumer of the data wants to display > it as a hyperlink, fine, but that that > is the job of the application not the > database But MS Access is _both_, remember? The question came up when migrating from Access talking to its own local Jet database

[GENERAL] Re: c function

2000-09-22 Thread K Parker
> Question: Why isn't 12 printed after the second SELECT statement? It's the well-known (?) problem that if any function parameter is NULL, they are all set to NULL. IIRC someone is working on fixing this... Join 18 million Eudora users by signing up for a free Eudora Web-Mail account at h

[GENERAL] Re: sequences

2000-09-21 Thread K Parker
Perhaps I was too brief before, wanting to spare folks long quotes from the manual that we all have, but here goes (quoting from http://www.postgresql.org/users-lounge/docs/7.0/postgres/sql-createsequence.htm): "After a sequence is created, you may use the function nextval(seqname) to get a ne

[GENERAL] Re: sequences

2000-09-20 Thread K Parker
Edward Q. Bridges's detailed statement regarding sequences, of which I extract merely the most pessimistic part: > begin; > insert into foo (A,B) values (B); > select currval('foo_A_seq'); > commit; > > note that the transaction is key, without > which there's no guarantee that some other >

[GENERAL] Re: Race conditions...

2000-09-09 Thread K Parker
> Whenever I do inserts like yours, I do it in > this kind of manner (I tried > to use your pseudocode style): > SELECT ID FROM ITEM WHERE URL='X' FOR UPDATE > IF (ROW RETURNED) { > $ID = ITEM.ID > } ELSE { > INSERT INTO ITEM ... > GET THE OID [via PQoidStatus or your > environment's equiva

[GENERAL] Openlink ODBC drivers for Unix

2000-07-31 Thread K Parker
Help! Is there any recent, comprehensive information for getting the openlink ODBC drivers installed (i.e. something like a HOWTO) for Linux? The PostgreSQL site merely links to openlink, but the information there is uselessly vague and/or out of date. That is, installing the RPM plus the SD

[GENERAL] Re: php connection

2000-07-14 Thread K Parker
> I thought that wouldn't work because PHP > doesn't substitute variables > between single quotes :-( You're right, it doesn't. But you don't _have_ single quotes in this case; the single quotes are simply chars _inside_ the double_quoted PHP string: database = pg_Connect ("host=db.example.c

[GENERAL] re: insert or update

2000-06-23 Thread K Parker
This looks scary to me: > CREATE FUNCTION names_trig() RETURNS OPAQUE AS ' > DECLARE > rec names%ROWTYPE; > BEGIN > IF TG_OP = ''INSERT'' THEN > SELECT * INTO rec FROM names WHERE name = NEW.name; > IF FOUND THEN > UPDATE n

[GENERAL] PHP3 support

2000-06-21 Thread K Parker
>I have setup a RH 6.2 box with postgres. >The httpd (apache) has support for php3. >But I don't know if the rh installation builds >in the php3 support in postgres. Here is the configuration setup from my own build of PHP3 (as an apache module, supporting PostgreSQL): Configure command: ./co

[GENERAL] record-locking protocol for interactive users

2000-06-17 Thread K Parker
> What happens if someone else updates the > record *just* after the record is > reread for update and timestamp compared? SELECT FOR UPDATE means no one else can update the row, doesn't it? Join 18 million Eudora users by signing up for a free Eudora Web-Mail account at http://www.eudorama