I have a table schema like:
CREATE TABLE table2 (
"id" BIGSERIAL PRIMARY KEY,
"uuid" VARCHAR(36) UNIQUE NOT NULL,
"column2" VARCHAR(24) NOT NULL
);
CREATE TABLE table1 (
"id" BIGSERIAL PRIMARY KEY,
"uuid" VARCHAR(36) UNIQUE NOT NULL,
"ref" VARCHAR(36) REFERENCES table2(uuid)
);
I'd like to do a query like SELECT * from table1 JOIN table2 ON table1.ref = table2.uuid, and have table2 referenced as a child struct. The problem is that both tables have id and uuid columns. Can I qualify the prof tags so that table2 has a prof tag of prof:"table2.uuid" for example? I know I can use "AS" clauses for each column, but this becomes a maintenance nightmare for any sizable number of queries.
I have a table schema like:
I'd like to do a query like
SELECT * from table1 JOIN table2 ON table1.ref = table2.uuid, and havetable2referenced as a child struct. The problem is that both tables haveidanduuidcolumns. Can I qualify theproftags so thattable2has aproftag ofprof:"table2.uuid"for example? I know I can use"AS"clauses for each column, but this becomes a maintenance nightmare for any sizable number of queries.