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
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
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');
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
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
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
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
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
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
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
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 ...;
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
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,
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
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
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
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
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
ðÒÉ×ÅÔ!
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.
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
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
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
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
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
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
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
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');
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.
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
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
-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
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:
-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.
33 matches
Mail list logo