php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #24287 Using user defined Domains
Submitted: 2003-06-22 13:35 UTC Modified: 2013-08-06 22:22 UTC
Votes:13
Avg. Score:4.8 ± 0.5
Reproduced:11 of 11 (100.0%)
Same Version:11 (100.0%)
Same OS:11 (100.0%)
From: zive at apollo dot lv Assigned: yohgaki (profile)
Status: Closed Package: PostgreSQL related
PHP Version: 4.3.3RC2-dev OS: Slackware Linux 9
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: zive at apollo dot lv
New email:
PHP Version: OS:

 

 [2003-06-22 13:35 UTC] zive at apollo dot lv
Description:
------------
In PostgreSQL 7.3.2 database I created domain - "public.nauda" (monetary data type) ar Number (8,2).
I have table on non-public schema - mySchema.myTable with column 'spec_price' with data type "public.nauda".
When I am calling pg_insert(), pg_update or pg_convert, I receive following error:
Notice: pg_convert(): Unknown or system data type 'nauda' for 'spec_price'. in xxx.php on line n
I am using variable $ids for containing ids (primary key of table) value if I am editing data, and $ids="new" if I am inserting new datas.

Reproduce code:
---------------
$data = array('proset_ids'=>$cmbProsetIds,
              'spec_price'=>$txtSpecPrice,
              ...
              );
if ($ids=="new")
  pg_insert($db, "tb_product_of_week", $data);
else
  pg_update($db, "tb_product_of_week", $data, array('ids'=>$ids));
$ids = "";

Expected result:
----------------
I am expecting result that data are inserted/updated in database.

Actual result:
--------------
Notice: pg_update(): Unknown or system data type 'nauda' for 'spec_price'. in xxx.php on line n

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-06-22 14:24 UTC] zive at apollo dot lv
I tested on newest PHP version 4.3.3RC2-dev and that problesm still exists
 [2003-07-22 09:46 UTC] rorezende at hotmail dot com
This occurr because the PHP do not include schema name in pg_insert, pg_update, pg_delete.
 [2003-07-22 11:46 UTC] iliaa@php.net
Normally you should specify the schema along with the table name ([schema].[table_name]) when using pg_(insert/update/convert). Therefor this is not a bug, however I do see the use for this functionality, so I making this report a feature request. 
 [2011-01-01 23:11 UTC] jani@php.net
-Package: Feature/Change Request +Package: PostgreSQL related
 [2012-03-31 05:21 UTC] yohgaki@php.net
-Assigned To: +Assigned To: yohgaki
 [2013-08-06 22:22 UTC] yohgaki@php.net
-Status: Assigned +Status: Closed
 [2013-08-06 22:22 UTC] yohgaki@php.net
Fix was done already.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Sat May 03 13:01:30 2025 UTC