Re: [SQL] maybe Offtopic : PostgreSQL & PHP ?

2001-04-18 Thread Keith Wong
Not quite sure how your code is organised... but you could access the variable $conn by including "connect.php" into the "query.php" script. Otherwise, you will need to use persistent connections... which can be achieved via pg_pconnect... a persistent connection will instead of creating a new d

Re: [SQL] Create table doesn't work in plpgsql

2000-12-23 Thread Keith Wong
I believe a couple of months back... a EXECUTE command was added to plpgsql to allow users to dynamic sql statements. So if you get the current development version you should be able to call EXECUTE CREATE TABLE or whatever sql you like. (I think this is still not in 7.03, not sure though

Re: [SQL] Blob Upload

2000-11-21 Thread Keith Wong
Do you mean VARCHAR[30] or VARCHAR(30)?? I think you're creating an array of chars... but what you want is just a VARCHAR type with 30 characters... It may explain the array error you are getting. Keith At 11:07 AM 21/11/2000 -0200, Aristeu Gil Alves Junior wrote: >I´m trying to upload a gif im

Re: [SQL] Persistent Connects (pg_pconnect)

2000-11-21 Thread Keith Wong
Just looked at the Php documentation... according to that.. it goes... "An 'identical' connection is a connection that was opened to the same host, with the same username and the same password (where applicable)." Perhaps that means you need to specify the host for this to work. Let me know on

Re: [SQL] Persistent Connects (pg_pconnect)

2000-11-21 Thread Keith Wong
Hi Colleen, When you use specify a host parameter... Php will attempt to connect to your postgres server using TCP/IP... if you are not running the postgres backend with the -i option, then these connections won't happen. When you don't specify a host name then Php will use a local Unix socket.

Re: [SQL] trigger examples

2000-10-03 Thread Keith Wong
This is an example script I use to keep a log of all database operations on my tables. Hope it helps. At 05:05 PM 3/10/2000 +1000, Carolyn Lu Wong wrote: >[EMAIL PROTECTED] wrote: > > > > Carolyn Lu Wong wrote: > > > > > > I need to write a trigger to create a new record in log table if it's a >

[SQL] Transaction isolation level for plpgsql

2000-09-29 Thread Keith Wong
Hi all, Does anybody know the transaction isolation level default when a plpgsql stored procedure is called? Is it possible to set it? Or is this controlled by SPI? Cheers, Keith.

[SQL] Setting the transaction isolation level for a stored procedure

2000-09-27 Thread Keith Wong
Sorry, I forgot to put a subject title in my last email. So here it is again. Hi ppl, Just wondering if anyone knows if its possible to set the transaction isolation level from inside a stored procedure in plpgsql. Or do I need to run the 'set transaction isolation level' command before I call

[SQL]

2000-09-27 Thread Keith Wong
Hi ppl, Just wondering if anyone knows if its possible to set the transaction isolation level from inside a stored procedure in plpgsql. Or do I need to run the 'set transaction isolation level' command before I called the stored procedure? I'm not even sure that would work, I assume plpgsql u

Re: [SQL] how to store a query, that results in a table

2000-09-22 Thread Keith Wong
This is not really possible with postgresql at the moment. Better off trying to work around, perhaps using a view. That way you have a way to change the select statement without actually modifying your client code. Keith. At 06:09 PM 22/09/2000 -0400, Nelson wrote: >thank you jie Liang for your

[SQL] installing pgaccess

2000-09-15 Thread Keith Wong
Anybody know how to compile pgaccess from postgres source files? It must be a configure option, but I can't find it. Keith.

Re: [SQL] Re: Argument variables for select

2000-08-29 Thread Keith Wong
Hi Andreas, I've worked with MS SQL stored procedures before and they are quite powerful. Its a shame postgres doesn't have the same level of features as offered by MS SQL, but apart from this area it is still a very good database. Perhaps in the coming versions we will see more stored procedur

[SQL] tip: weird parse error for pl/pgsql

2000-08-22 Thread Keith Wong
Hi everyone, After fiddling for about a day to work out why my pl/pgsql stored procedures weren't working I finally discovered why. It seems that pl/pgsql has a problem parsing Window style new line characters. I was writing my stored procedures using a Windows app, and then running them on my

[SQL] Copying data with triggers

2000-08-21 Thread Keith Wong
Hi all, In the database I'm designing, I want to have audit tables that keep a log of all inserts, updates and deletes that occur on any table. e.g. If i had a table Info, create table Info ( info_id SERIAL, some_data text ) I would also have a corresponding audit ta

[SQL] 8K Limit, whats the best strategy?

2000-08-15 Thread Keith Wong
Hi everyone, Just wondering what strategies people have used to get around the 8K row limit in Postgres. If anyone has been troubled by this limitation before and has a nice solution around it, I would love to hear it. My application is a web-based system in which needs to store large amounts

[SQL] returning a recordset with pl/pgsql

2000-08-08 Thread Keith Wong
Hi everyone, I'm using postgresql with php4. I wanted to write a stored procedure to return a recordset (using pl/pgsql). From what I've read from the documentation it seems like you can only returned postgres types like strings, booleans, etc. Is it possible to return recordsets using pl/pgs