#24679 [NEW]: pg_insert problem!
| From: | rorezende at hotmail dot com | Date: | Wed, 16 Jul 2003 14:44:50 +0000 |
| Subject: | #24679 [NEW]: pg_insert problem! | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-44132@lists.php.net to get a copy of this message | ||
From: rorezende at hotmail dot com
Operating system: ALL
PHP version: 4.3.2
PHP Bug Type: PostgreSQL related
Bug description: pg_insert problem!
Description:
------------
In source code of php 4.3.2 exists an error ext/pgsql/pgsql.c.
In the function pg_convert (php_pgsql_convert) it is not necessary to
specify the schema name. But in the sql statement insert it is. Below is
the portion of the source code which needs to be fixed.
Reproduce code:
---------------
ext/pgsql/pgsql.c :
function : PHPAPI int php_pgsql_insert(PGconn *pg_link, const char *table,
zval *var_array, ulong opt, char **sql TSRMLS_DC)
line (HERE --> smart_str_appends(&querystr, table);)
Must be something like :
NEW HERE -->
smart_str_appends(&querystr, schema);
smart_str_appends(&querystr, ".");
smart_str_appends(&querystr, table);
the schema name can be obtained from realnamespace collumn (oid) from
table pg_class.
Expected result:
----------------
pg_insert should include the schema name in the insert sql statement.
Actual result:
--------------
the schema name is not specify in sql
--
Edit bug report at http://bugs.php.net/?id=24679&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=24679&r=trysnapshot4
Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=24679&r=trysnapshot5
Fixed in CVS: http://bugs.php.net/fix.php?id=24679&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=24679&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=24679&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=24679&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=24679&r=support
Expected behavior: http://bugs.php.net/fix.php?id=24679&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=24679&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=24679&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=24679&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=24679&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=24679&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=24679&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=24679&r=gnused