AL
Size: a a a
AL
YS
AL
E
VS
E
E
AL
Λ
CREATE TABLE files
(
id uuid PRIMARY KEY DEFAULT uuid_generate_v4(),
name TEXT NOT NULL UNIQUE,
content TEXT NOT NULL,
groups uuid[] NOT NULL
);
CREATE TABLE groups
(
id uuid PRIMARY KEY DEFAULT uuid_generate_v4(),
name TEXT NOT NULL UNIQUE,
read BOOLEAN NOT NULL,
write BOOLEAN NOT NULL,
users uuid[] NOT NULL
);
select g.name from groups as g where g.id = any (select f.groups from files as f where name = 'hello');
ERROR: operator does not exist: uuid = uuid[]
LINE 1: select g.name from groups as g where g.id = any (select f.gr...
^
HINT: No operator matches the given name and argument types. You might need to add explicit type casts.
VS
2_
CREATE TABLE files
(
id uuid PRIMARY KEY DEFAULT uuid_generate_v4(),
name TEXT NOT NULL UNIQUE,
content TEXT NOT NULL,
groups uuid[] NOT NULL
);
CREATE TABLE groups
(
id uuid PRIMARY KEY DEFAULT uuid_generate_v4(),
name TEXT NOT NULL UNIQUE,
read BOOLEAN NOT NULL,
write BOOLEAN NOT NULL,
users uuid[] NOT NULL
);
select g.name from groups as g where g.id = any (select f.groups from files as f where name = 'hello');
ERROR: operator does not exist: uuid = uuid[]
LINE 1: select g.name from groups as g where g.id = any (select f.gr...
^
HINT: No operator matches the given name and argument types. You might need to add explicit type casts.
2_
YS
Λ
YS
CREATE TABLE files
(
id uuid PRIMARY KEY DEFAULT uuid_generate_v4(),
name TEXT NOT NULL UNIQUE,
content TEXT NOT NULL,
groups uuid[] NOT NULL
);
CREATE TABLE groups
(
id uuid PRIMARY KEY DEFAULT uuid_generate_v4(),
name TEXT NOT NULL UNIQUE,
read BOOLEAN NOT NULL,
write BOOLEAN NOT NULL,
users uuid[] NOT NULL
);
select g.name from groups as g where g.id = any (select f.groups from files as f where name = 'hello');
ERROR: operator does not exist: uuid = uuid[]
LINE 1: select g.name from groups as g where g.id = any (select f.gr...
^
HINT: No operator matches the given name and argument types. You might need to add explicit type casts.
= ANY((select f.groups from files as f where name = 'hello')::uuid[])
Λ
select g.name from groups as g where exists (select 1 from files as f where g.id = any (f.groups) and f.name = 'hello');
Λ
= ANY((select f.groups from files as f where name = 'hello')::uuid[])
2_
select g.name from groups as g where exists (select 1 from files as f where g.id = any (f.groups) and f.name = 'hello');
K
MS
no pg_hba.conf entry for host "host", user "user", database "db", SSL off
Хотя до этого всё было в порядке"?sslmode=required"
, "?ssl=true&sslfactory=org.postgresql.ssl.NonValidatingFactory"
Ничего не помогло