【发布时间】:2012-08-14 03:21:40
【问题描述】:
我有一个自定义类型
CREATE TYPE mytype as (id uuid, amount numeric(13,4));
我想将它传递给具有以下签名的函数:
CREATE FUNCTION myschema.myfunction(id uuid, mytypes mytype[])
RETURNS BOOLEAN AS...
如何在 postgres 查询中调用它,并且不可避免地从 PHP 中调用它?
【问题讨论】:
-
选择 myschema.myfunc('0d6311cc-0d74-4a32-8cf9-87835651e1ee' , ARRAY[('ac747f0e-93d4-43a9-bc5b-09df06593239', '25.00') , (e'6449fb3b-4 -440e-8973-31eb6bbefc81', '10.00')]::mytype[] );不过还是需要php!
标签: php sql postgresql postgresql-9.1 plpgsql