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:
co-authored by
Cole Arendt
parent
42d7cf8ae5
commit
3b83f536ca
Vendored
+19
-1
@@ -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
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user