【发布时间】:2020-01-30 01:06:41
【问题描述】:
在将 fhirbase 模式导入到 Greenplum 数据库中时,会给出一个错误,即其中一个必要的功能需要另一个在数据库中不存在的功能:
CREATE OR REPLACE FUNCTION _fhirbase_to_resource(x _resource)
RETURNS jsonb AS $$
select x.resource || jsonb_build_object(
'resourceType', x.resource_type,
'id', x.id,
'meta', coalesce(x.resource->'meta', '{}'::jsonb) || jsonb_build_object(
'lastUpdated', x.ts,
'versionId', x.txid::text
)
);
$$ LANGUAGE sql;
它返回了错误和提示:
LINE 6: ...ta', coalesce(x.resource->'meta', '{}'::jsonb) || jsonb_buil...
^
HINT: No function matches the given name and argument types. You might need to add explicit type casts.
是否可以通用地覆盖这个函数?
- Ubuntu-Server 18.04
- Greenplum 数据库:6.3.0
【问题讨论】:
标签: sql jsonb greenplum hl7-fhir