Re: [GENERAL] Slashdot and PostgreSQL - Mailing list pgsql-hackers

From Robert B. Easter
Subject Re: [GENERAL] Slashdot and PostgreSQL
Date
Msg-id 0101171646570B.02219@comptechnews
Whole thread Raw
In response to Re: [GENERAL] Slashdot and PostgreSQL  (Alessio Bragadini <alessio@albourne.com>)
List pgsql-hackers
On Wednesday 17 January 2001 02:53, Alessio Bragadini wrote:
> Hunter Hillegas wrote:
> > I don't think they're moving the actual Slashdot site to PostgreSQL...
>
> So do I.
>
> > I think other sites based on Slashcode wanted to be able to use
> > PostgreSQL though...
>
> That's what I will do as soon as possible, and I am trying to be
> involved as much as possible in the current development. I am also
> waiting for 7.1 to have a cleaner environment to test it.

I made a board with php and postgresql. It's *terrible* code but is working
at www.comptechnews.com.  If anyone is interested in playing with it, I can
make it available.  Who knows, the code might have bugs that are very
compromising! :)  People might like to improve it. It consists of one php
file and three sql files (tables, data, & procedures).  It uses PL/pgSQL and
PL/TcL.  You just run the tables sql, load data, then run procedures sql.
Put the php file in a directory and change the pg_pconnect line to connect to
the right db.  The php file is 3638 lines.  It tries fairly hard to be
automatically moderated and to have good protection from users trying to do
bad things.  Code in the php and in the trigger procs provide two layers of
logic that tries to ensure only correct things happen.  It takes good
advantage of transactions.  The RAISE EXCEPTION PL/pgSQL call is used to
rollback/abort things that shouldn't happen ... stuff like that.  The trigger
procs do recursive stuff to manage the threaded messages and topics. Again
the php code is an embarrassment, but I don't care! :)


--
-------- Robert B. Easter  reaster@comptechnews.com ---------
-- CompTechNews Message Board http://www.comptechnews.com/ --
-- CompTechServ Tech Services http://www.comptechserv.com/ --
---------- http://www.comptechnews.com/~reaster/ ------------

pgsql-hackers by date:

Previous
From: Ian Lance Taylor
Date:
Subject: Cursors in PL/pgSQL
Next
From: Bruce Momjian
Date:
Subject: Re: $PGDATA/base/???