fix: bad M2M embed on RPC

This commit is contained in:
steve-chavez
2022-11-18 17:49:24 -05:00
committed by Steve Chavez
parent cca0b5ae66
commit cb99270a8f
7 changed files with 39 additions and 18 deletions
+21
View File
@@ -3005,3 +3005,24 @@ create table test.trash_details(
id int primary key references test.trash(id),
jsonb_col jsonb
);
CREATE TABLE test.groups (
name text PRIMARY KEY
);
CREATE TABLE test.yards (
id bigint PRIMARY KEY
);
CREATE TABLE test.group_yard (
id bigint NOT NULL,
group_id text NOT NULL REFERENCES test.groups(name),
yard_id bigint NOT NULL REFERENCES test.yards(id),
PRIMARY KEY (id, group_id, yard_id)
);
CREATE FUNCTION test.get_yards() RETURNS SETOF test.yards
LANGUAGE sql
AS $$
select * from test.yards;
$$;