【发布时间】:2019-02-28 17:50:11
【问题描述】:
我已将一些存储过程从 Oracle 转换为 PostgreSQL,但遇到以下问题:
我在 PostgreSQL 中有一个用户定义的类型:
CREATE TYPE ut_merci_row AS (
SGLCNTNR varchar(100),
CODEST_MERCEVARIA varchar(50),
CODCICLO smallint
);
CREATE TYPE ut_merci_table AS (ut_merci_table UT_MERCI_ROW[]);
在甲骨文中:
retTable UT_MERCI_TABLE := UT_MERCI_TABLE();
.....
retTable.extend;
retTable(retTable.last) := UT_MERCI_ROW(rec.SGLCNTNR,rec.CODEST_MERCEVARIA,rec.CODCICLO);
您能告诉我如何将下面最后两行代码转换为 PostgreSQL 吗?
retTable.extend;
retTable(retTable.last) := UT_MERCI_ROW(rec.SGLCNTNR,rec.CODEST_MERCEVARIA,rec.CODCICLO);
有人说我们不需要在 PostgreSQL 中“扩展”集合。
【问题讨论】:
标签: arrays postgresql