M
col_7, col_5
и col_3, col_1
тоже допустимыSize: a a a
M
col_7, col_5
и col_3, col_1
тоже допустимыVY
YS
M
on a using btree(col_1, col_2)
+ on b using btree(col_5, col_7)
on a using btree(col_2, col_1)
+ on b using btree(col_5, col_7)
YS
МБ
VY
on a using btree(col_1, col_2)
+ on b using btree(col_5, col_7)
on a using btree(col_2, col_1)
+ on b using btree(col_5, col_7)
МБ
DROP TABLE IF EXISTS org_temp;
CREATE TEMP TABLE org_temp
(
email varchar,
orgid uuid
);
COPY
org_temp (email)
FROM 'C:\out\max.csv' DELIMITER ';' CSV HEADER;
UPDATE org_temp set orgid = 'a80bf11c-9214-432f-ad34-ac7d00b29b73';
DELETE FROM customerdata__2__organization
Where customerdata__2__organization IN (select distinct u.customerdataid, ot.orgid from org_temp ot)
join "User" u ON u.email = ot.email where u.isremoved is false
and u.customerdataid in (
select customerdataid from customerdata__2__organization
where organizationid = 'a80bf11c-9214-432f-ad34-ac7d00b29b73');
ERROR
: syntax error at or near "join"YS
[ WITH [ RECURSIVE ] with_query [, ...] ]Вы здесь где-то видите JOIN? Не придумывайте свой синтаксис, напишите в соответствии с этим. ;)
DELETE FROM [ ONLY ] table_name [ * ] [ [ AS ] alias ]
[ USING from_item [, ...] ]
[ WHERE condition | WHERE CURRENT OF cursor_name ]
[ RETURNING * | output_expression [ [ AS ] output_name ] [, ...] ]
ГА
DROP TABLE IF EXISTS org_temp;
CREATE TEMP TABLE org_temp
(
email varchar,
orgid uuid
);
COPY
org_temp (email)
FROM 'C:\out\max.csv' DELIMITER ';' CSV HEADER;
UPDATE org_temp set orgid = 'a80bf11c-9214-432f-ad34-ac7d00b29b73';
DELETE FROM customerdata__2__organization
Where customerdata__2__organization IN (select distinct u.customerdataid, ot.orgid from org_temp ot)
join "User" u ON u.email = ot.email where u.isremoved is false
and u.customerdataid in (
select customerdataid from customerdata__2__organization
where organizationid = 'a80bf11c-9214-432f-ad34-ac7d00b29b73');
ERROR
: syntax error at or near "join"ГА
DROP TABLE IF EXISTS org_temp;
CREATE TEMP TABLE org_temp
(
email varchar,
orgid uuid
);
COPY
org_temp (email)
FROM 'C:\out\max.csv' DELIMITER ';' CSV HEADER;
UPDATE org_temp set orgid = 'a80bf11c-9214-432f-ad34-ac7d00b29b73';
DELETE FROM customerdata__2__organization
Where customerdata__2__organization IN (select distinct u.customerdataid, ot.orgid from org_temp ot)
join "User" u ON u.email = ot.email where u.isremoved is false
and u.customerdataid in (
select customerdataid from customerdata__2__organization
where organizationid = 'a80bf11c-9214-432f-ad34-ac7d00b29b73');
ERROR
: syntax error at or near "join"M
МБ
M
VU
VY
SET statement_timeout TO '10s';
VY
M
M
YS