Correct inner join to use proper aliases (#1978)

"_" was used for all the internal json_agg aliases. Now an alias
with "_" plus a local table name is used.

Co-authored-by: Cole Arendt <cole.arendt@outlook.com>
This commit is contained in:
Steve Chavez
2021-10-18 17:34:31 -05:00
committed by GitHub
co-authored by Cole Arendt
parent 42d7cf8ae5
commit 3b83f536ca
5 changed files with 64 additions and 10 deletions
+19 -1
View File
@@ -2347,4 +2347,22 @@ create table suppliers_trade_unions(
supplier_id int references suppliers(id),
trade_union_id int references trade_unions(id),
primary key (supplier_id, trade_union_id)
);
);
CREATE TABLE client (
id int primary key
, name text
);
CREATE TABLE contact (
id int primary key
, name text
, clientid int references client(id)
);
CREATE TABLE clientinfo (
id serial primary key
, clientid int unique references client(id)
, other text
);