Req #25854 [Asn->Wfx]: Return value for pg_insert should be resource instead of bool
Edit report at https://bugs.php.net/bug.php?id=25854&edit=1
ID: 25854
Updated by: yohgaki@php.net
Reported by: kyle at kipr dot org
Summary: Return value for pg_insert should be resource
instead of bool
-Status: Assigned
+Status: Wont fix
Type: Feature/Change Request
Package: PostgreSQL related
Operating System: RH9.0 Linux
PHP Version: 4.3.3
Assigned To: yohgaki
Block user comment: N
Private report: N
New Comment:
I think twice if returning oid is good.
It may be useful for some applications, but it may not for recent usages. Recent
postgresql apps omits OID often.
Therefore, I'll not change this behavior.
Previous Comments:
------------------------------------------------------------------------
[2012-03-31 05:25:16] yohgaki@php.net
OID was always available for old PostgreSQL, but OID can be omitted.
It's possible to return OID when it's available otherwise return true.
------------------------------------------------------------------------
[2003-10-13 14:29:41] kyle at kipr dot org
Description:
------------
Currently, pg_insert() returns a bool rather than a resource. Usually, insert queries return
resources which can be passed to pg_last_oid() for pulling the OID of that insert statement's
created row. However, nothing can really be done with the "true" return value given by
pg_insert(), therefore making it not quite as useful a function as it could be.
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=25854&edit=1
Thread (5 messages)