Re: [GENERAL] prepare, execute oids

2006-08-02 Thread phazon
I use PHP.When I make juste a simple insert likeInsert Into my_table (my_field) values ('value')I get back the OID of the inserted line.But when i use the prepareInsert fonction, I get nothing back. That's a pprobleme becaus i need to take the primary key of the line inserted in order to make

Re: [GENERAL] prepare, execute oids

2006-08-02 Thread Martijn van Oosterhout
On Wed, Aug 02, 2006 at 09:25:43AM +0200, phazon wrote: When I make juste a simple insert like Insert Into my_table (my_field) values ('value') I get back the OID of the inserted line. You really don't want to use OID, you want a sequence. (Hint: OIDs are not really unique, not a primary

Re: [GENERAL] prepare, execute oids

2006-08-02 Thread Chris
phazon wrote: I use PHP. When I make juste a simple insert like Insert Into my_table (my_field) values ('value') I get back the OID of the inserted line. But when i use the prepareInsert fonction, I get nothing back. That's a pprobleme becaus i need to take the primary key of the line

Re: [GENERAL] prepare, execute oids

2006-08-02 Thread Michael Fuhr
On Wed, Aug 02, 2006 at 09:25:43AM +0200, phazon wrote: I use PHP. When I make juste a simple insert like Insert Into my_table (my_field) values ('value') I get back the OID of the inserted line. But when i use the prepareInsert fonction, I get nothing back. That's a pprobleme becaus i

[GENERAL] prepare, execute oids

2006-08-01 Thread phazon
Hello, i've this kind of query:PREPARE preparedInsert (varchar) AS INSERT INTO my_table (my_field) VALUES ($1); ');and i use it with: EXECUTE preparedInsert ('test'); I juste want to get the OID of the line inserted. Does anyone know how to do it ?Thanks,Phazon

Re: [GENERAL] prepare, execute oids

2006-08-01 Thread Michael Fuhr
On Tue, Aug 01, 2006 at 06:19:29PM +0200, phazon wrote: I juste want to get the OID of the line inserted. Does anyone know how to do it ? It depends on the client interface. What interface are you using? OIDs are deprecated as row identifiers; the preferred method is to use a sequence (serial