Questions tagged «array»

3
如何将带有数组字段的表类型传递给Postgresql中的函数
我有一张桌子叫书 CREATE TABLE book ( id smallint NOT NULL DEFAULT 0, bname text, btype text, bprices numeric(11,2)[], CONSTRAINT key PRIMARY KEY (id ) ) 和一个功能save_book CREATE OR REPLACE FUNCTION save_book(thebook book) RETURNS text AS $BODY$ DECLARE myoutput text :='Nothing has occured'; BEGIN update book set bname=thebook.bname, btype=thebook.btype,bprices=thebook.bprices WHERE id=thebook.id; IF …
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.