ID: 34920 Comment by: nong11yjyygy at yahoo dot com Reported By: n dot j dot saunders at gmail dot com Status: Assigned Bug Type: PostgreSQL related Operating System: * PHP Version: 5CVS-2005-10-31 (cvs) Assigned To: helly New Comment:
very good http://www.11nong.com Previous Comments: ------------------------------------------------------------------------ [2006-03-20 06:10:53] nong11yjyygy at yahoo dot com very good http://www.11nong.com ------------------------------------------------------------------------ [2005-11-01 11:42:48] [EMAIL PROTECTED] Assigned to the maintainer (according to EXTENSIONS file :) ------------------------------------------------------------------------ [2005-10-24 10:31:47] chriskl at familyhealth dot com dot au As a pgsql developer, this is definitel a bug. These are the possible fixes: * Get rid of unknown and make the error message say 'this type is not supported' * Query for the domain's base type and use that. AFAIK, from postgresql 8.0 onwards the type of domain columns is always reported as the base type via libPQ. Might want to check when that changed. (Might be wrong tho.) Check the PQftype function here: http://www.postgresql.org/docs/8.0/interactive/libpq-exec.html#LIBPQ-EXEC-SELECT-INFO ------------------------------------------------------------------------ [2005-10-20 00:10:46] n dot j dot saunders at gmail dot com Tried as requested - Still unable to perform update, but at least we now get an error: Notice: pg_convert() [function.pg-convert]: Unknown or system data type 'area_code' for 'telephone_area' in c:\documents and settings\neil.saunders\workspace\tvc\www\testpg.php on line 7 Notice: pg_update() [function.pg-update]: Unknown or system data type 'area_code' for 'telephone_area' in c:\documents and settings\neil.saunders\workspace\tvc\www\testpg.php on line 10 ERROR $db_conn = pg_connect("host=localhost port=5432 dbname=TVC user=postgres password=xxx"); $data = array('telephone_area'=>'701'); pg_convert($db_conn, "advertisers", $data); $res = pg_update($db_conn, "advertisers", $data, array('id'=>'2')); if($res) { echo "OK"; } else { echo "ERROR"; } Is there any way that pg_convert/pg_update can perform this? Postgres seems to handle the implied type conversion when the operation is performed via SQL? Maybe just a documented caveat required? Thanks Guys. ------------------------------------------------------------------------ [2005-10-19 21:56:19] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php5-latest.tar.gz For Windows: http://snaps.php.net/win32/php5-win32-latest.zip If you still able to reproduce it - please provide a short but complete reproduce code and take a look into the Apache logs (if there are any entries related to the problem - paste some of them here). ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/34920 -- Edit this bug report at http://bugs.php.net/?id=34920&edit=1
