[PHP] Postgres auto-commit

2005-10-04 Thread Skippy
How can I disable auto-commit for a Postgres connection? Apparently server-side autocommit was thrown out in Postgres 8.0, and clients have to issue their own setting (which is sensible). The default is on (which I don't want). psql is apparently able to set or unset the AUTOCOMMIT option, but I

Re: [PHP] Postgres auto-commit

2005-10-04 Thread Skippy
Quoting Skippy [EMAIL PROTECTED]: How can I disable auto-commit for a Postgres connection? Apparently server-side autocommit was thrown out in Postgres 8.0, and clients have to issue their own setting (which is sensible). Apparently this will work (or at least it will be accepted by

Re: [PHP] postgres - mysql last_inserted_id

2005-07-01 Thread david forums
Hi I'm migrating also to posgresql. The easyest way to manage incrementation with postgres is to use sequences. How to : Create a sequence for each table that need autoincrementation. use pgMyAdmin, to make all needed changes before any insert call the id. select nextval('tablename_seq');

Re: [PHP] postgres - mysql last_inserted_id

2005-07-01 Thread Jason Wong
On Friday 01 July 2005 09:55, Richard Lynch wrote: There are innumerable on-line forums that (incorrectly) state that an OID could be returned that is not connection-specific, so two HTTP requests in parallel would criss-cross OIDs. This is patently false, and any user of PostgreSQL can

Re: [PHP] postgres - mysql last_inserted_id

2005-07-01 Thread Martín Marqués
El Vie 01 Jul 2005 06:27, david forums escribió: before any insert call the id. select nextval('tablename_seq'); and pass this id to your insert. No. Best is to but a DEFAULT clause of nextval('tablename_seq') in the table definition. -- select 'mmarques' || '@' || 'unl.edu.ar' AS

Re: [PHP] postgres - mysql last_inserted_id

2005-07-01 Thread Philip Hallstrom
OIDs *can* get re-used *IF* you end up having more than 32-bits (2 billion plus) of objects in the lifetime of your application. For normal usage, that ain't a big problem, honestly... Though I should have stated it for the record, cuz maybe the OP has a site where 2 BILLION INSERTs are gonna

Re: [PHP] postgres - mysql last_inserted_id

2005-07-01 Thread Richard Lynch
On Fri, July 1, 2005 6:24 am, Jason Wong said: On Friday 01 July 2005 09:55, Richard Lynch wrote: If there's a reliable, web-safe, connection-dependent way of getting the sequence ID used in an INSERT, it sure ain't documented, and I've never seen it discussed on the PostgreSQL list (which I

[PHP] postgres - mysql last_inserted_id

2005-06-30 Thread Uroš Kristan
Hello, I have an application in production, build on mysql database. I decided to migrate to postgres because of numerous reasons. Can you guys please guide me into the right direction? the main problem is the missing autoincrement of pgsql and getting the last record from the tabel, for

Re: [PHP] postgres - mysql last_inserted_id

2005-06-30 Thread Richard Lynch
On Thu, June 30, 2005 11:55 am, Uro¹ Kristan said: I have an application in production, build on mysql database. I decided to migrate to postgres because of numerous reasons. Can you guys please guide me into the right direction? the main problem is the missing autoincrement of pgsql and

Re: [PHP] postgres - mysql last_inserted_id

2005-06-30 Thread Jason Wong
On Friday 01 July 2005 02:55, Uroš Kristan wrote: I have an application in production, build on mysql database. I decided to migrate to postgres because of numerous reasons. Good idea :) Can you guys please guide me into the right direction? the main problem is the missing autoincrement

Re: [PHP] postgres - mysql last_inserted_id

2005-06-30 Thread Jason Wong
On Friday 01 July 2005 04:06, Richard Lynch wrote: last record from the tabel, for linking to another tabel. You have to use http://php.net/pg_last_oid to get the PostgreSQL internal Object ID (OID) -- You can then use the ubiquitous oid column. $query = insert ...;

Re: [PHP] postgres - mysql last_inserted_id

2005-06-30 Thread Richard Lynch
On Thu, June 30, 2005 2:17 pm, Jason Wong said: On Friday 01 July 2005 04:06, Richard Lynch wrote: last record from the tabel, for linking to another tabel. You have to use http://php.net/pg_last_oid to get the PostgreSQL internal Object ID (OID) -- You can then use the ubiquitous oid

[PHP] postgres-embedded images via php. two issues...

2004-11-02 Thread P. George
i am storing images in a postgres database and i have set up a little php file to retrieve them in such a way that i can do: echo img src='gif.php?name=$picname'; ...from another php file. it's working great, BUT i've noticed two things that bother me: [1] if someone wants to download an image,

Re: [PHP] postgres-embedded images via php. two issues...

2004-11-02 Thread Robby Russell
On Tue, 2004-11-02 at 16:45 -0600, P. George wrote: i am storing images in a postgres database and i have set up a little php file to retrieve them in such a way that i can do: echo img src='gif.php?name=$picname'; ...from another php file. it's working great, BUT i've noticed two

Re: [PHP] postgres-embedded images via php. two issues...

2004-11-02 Thread Tom Rogers
Hi, Wednesday, November 3, 2004, 8:45:17 AM, you wrote: PG i am storing images in a postgres database and i have set up a little PG php file to retrieve them in such a way that i can do: PG echo img src='gif.php?name=$picname'; PG ...from another php file. PG it's working great, BUT i've

Re: [PHP] postgres-embedded images via php. two issues...

2004-11-02 Thread Robby Russell
On Wed, 2004-11-03 at 10:20 +1000, Tom Rogers wrote: Hi, Wednesday, November 3, 2004, 8:45:17 AM, you wrote: PG i am storing images in a postgres database and i have set up a little PG php file to retrieve them in such a way that i can do: PG echo img src='gif.php?name=$picname'; PG

Re: [PHP] postgres-embedded images via php. two issues...

2004-11-02 Thread raditha dissanayake
P. George wrote: i am storing images in a postgres database and i have set up a little php file to retrieve them in such a way that i can do: This topic came up a few days ago and the pros and cons of saving images in a data base was argued with very few pros been given. However the defining

[PHP] Postgres-Transaction-user_ignore_abort-Connection stop by the client

2002-10-16 Thread Max Buvry
Hi, I use Postgresql 7.2.2 + php 4.2.3 and I meet a problem with transaction and connections interruption. The application is the famous example of the bank accounts and the money transfers. I consider a table named DEAL where each transaction is saved. Each tuple has an id number as key. When

[PHP] Postgres and chinese, korean, japanese charsets

2002-07-08 Thread Alberto Serra
ðÒÉ×ÅÔ! Jean-Christian Imbeault wrote: Alberto Serra wrote: I hope you mean one charset per language. Otherwise I can just cancel POstgres from my list of usable engines. But yes, it can't be just one. I'm no pgsql expert but I think that yes, it will only accept input in one charset.

Re: [PHP] Postgres query problem

2002-06-12 Thread 1LT John W. Holmes
Subject: [PHP] Postgres query problem I have a sql quer like this : select a.title AS bugga, b.id AS asdf FROM tableone AS a FULL JOIN tabletwo AS b ON(a.title=b.filething) anyway, thats a test query which is slightly smaller then the one I want. BUT when i use it from the command console

Re: [PHP] Postgres query problem

2002-06-12 Thread Aaron
Yeah, I found the problem, It was adding a order by lower(title) in another class which I forgot about when I was trying to test the query. so it works fine now. So yep, using, joines, case, order bys, lowers,inheritance in php/postgres all work fine. 1LT John W. Holmes wrote: Double check

[PHP] Postgres query problem

2002-06-11 Thread Aaron
I have a sql quer like this : select a.title AS bugga, b.id AS asdf FROM tableone AS a FULL JOIN tabletwo AS b ON(a.title=b.filething) anyway, thats a test query which is slightly smaller then the one I want. BUT when i use it from the command console in postgres, it works no problem but in

Re: [PHP] Postgres question

2002-03-31 Thread Thalis A. Kalfigopoulos
There is a utiliti under contrib/ called oid2name which returns the name of the object given its oid. This will probably help you locate which directories correspond to which database. cheers, --thalis On Sat, 30 Mar 2002, Robert Abbate wrote: Greetings to all! I have a webhosting

[PHP] Postgres question

2002-03-30 Thread Robert Abbate
Greetings to all! I have a webhosting company, and I'm trying to be able to use PHP to calculate each of my hosting customer's Postgres database disk usage. It doesn't seem as easy as MySQL (since MySQL uses the user name to store all their database files). Does anyone know how I can calculate

[PHP] postgres

2002-01-09 Thread aurelio
somebody can help me, does not obtain to discover because this error with postgres happens? Warning: PostgresSQL query failed: ERROR: pollolitoral_cidade: Permission denied. in ../php3/pg_functions.php3 on line 172 Thanks, Aurélio Sabino

RE: [PHP] postgres

2002-01-09 Thread Dave
PROTECTED] Subject: [PHP] postgres somebody can help me, does not obtain to discover because this error with postgres happens? Warning: PostgresSQL query failed: ERROR: pollolitoral_cidade: Permission denied. in ../php3/pg_functions.php3 on line 172 Thanks, Aurélio Sabino -- PHP General

[PHP] postgres session handling

2001-12-17 Thread James Gregory
I have need to get php to use postgres to store session information. I've changed the directive in php.ini and written a set of functions that should do the job and I've made the call to set the session handler. The following simple test case works: ? require_once ('database.php');

Re: [PHP] postgres and php

2001-07-14 Thread Nuno Silva
hi there! the operators you want are ~ and ~* and !~ and !~*. select name from table where name ~* 'test'; to see all operators availlable type \do in psql's interactive mode ;) Regards, Nuno Silva Derek wrote: anyone know how I force a case insensitive search through a postgres database.

[PHP] postgres and php

2001-07-13 Thread Derek
anyone know how I force a case insensitive search through a postgres database. I've got a search looking for 'something like '%something%' but this won't find 'SOMETHING'...if you know what I mean!? Thanks in advance for any help Derek -- PHP General Mailing List (http://www.php.net/) To

[PHP] php/postgres display information...

2001-05-08 Thread Daniel L. Ferrell
hey guys, alright, I am new to using php to interface with a database, right now I am trying to display just the primary keys for a table in my database, can someone point me in the right direction on how to use php to display this information? Dan -- PHP General Mailing List

RE: [PHP] php/postgres display information...

2001-05-08 Thread Jason Lotito
-Original Message- From: Daniel L. Ferrell [mailto:[EMAIL PROTECTED]] Sent: Tuesday, May 08, 2001 4:07 PM To: [EMAIL PROTECTED] Subject: [PHP] php/postgres display information... hey guys, alright, I am new to using php to interface with a database, right now I am

Re: [PHP] php/postgres display information...

2001-05-08 Thread Joe Conway
hey guys, alright, I am new to using php to interface with a database, right now I am trying to display just the primary keys for a table in my database, can someone point me in the right direction on how to use php to display this information? Create a function to supply the info -- see:

[PHP] Postgres pconnect

2001-01-17 Thread H. Wade Minter
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 I have a website where each new page access connects to a Postgres database to load information. Each DB connect uses a $dblink=pg_connect() to connect to the database. I'd like to avoid the overhead with opening a new connection with every page.