Edit report at https://bugs.php.net/bug.php?id=25854&edit=1
ID: 25854 Updated by: [email protected] Reported by: kyle at kipr dot org Summary: Return value for pg_insert should be resource instead of bool -Status: Wont fix +Status: Assigned 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: Returning resource makes sense. Assigned again. Previous Comments: ------------------------------------------------------------------------ [2012-04-17 10:30:27] [email protected] 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. ------------------------------------------------------------------------ [2012-03-31 05:25:16] [email protected] 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
