é ãã©ãè¨è¨ãã¤ã2019ã®çºè¡¨è³æã§ãã
CREATE TABLE parents ( parent_id bigserial PRIMARY KEY, "name" varchar NOT NULL UNIQUE ); CREATE TABLE children ( child_id bigserial PRIMARY KEY, "name" varchar NOT NULL UNIQUE, parent_id bigint NOT NULL REFERENCES parents(parent_id) ); CREATE OR REPLACE FUNCTION upsert_parent(parent json) RETURNS TABLE(parent json) AS $$ with parent_candidates AS ( -- å¼æ°ã® JSON ãéæ£è¦å½¢ã®ãã¼ãã«ã«å¤æ SELECT * FROM json_to_
ã©ã³ãã³ã°
ã©ã³ãã³ã°
ã©ã³ãã³ã°
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}