clear markdown compare help donate or buy diddy dollings comments/suggestions/bugs a leap of faith? bible365
clear markdown donate comments/suggestions/bugs a leap of faith? bible365 diddy dollings
By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0. 809180 fiddles created (9716 in the last week).

create table users (user_id int, projects text[]);
 hidden batch(es)


insert into users values (1, (array['a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11', 'b0eebc99-9c0b-4ef8-bb6d-cbb9bd380a11'])::text[]);
1 rows affected
 hidden batch(es)


insert into users values (2, (array['a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11', 'b0eebc99-9c0b-4ef8-bb6d-cbb9bd380a11', 'a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11'])::text[]);
1 rows affected
 hidden batch(es)


insert into users values (3, (array['f0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11', '', 'e0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11'])::text[]);
1 rows affected
 hidden batch(es)


create table projects (project_id uuid); insert into projects values ('a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11'::uuid), ('d0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11'::uuid), ('e0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11'::uuid);
3 rows affected
 hidden batch(es)


select user_id, project_id from projects join users on project_id::text = any(projects);
user_id project_id
1 a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11
2 a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11
3 e0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11
 hidden batch(es)


select user_id, project_id from projects join users on project_id = any(projects::uuid[])
ERROR: invalid input syntax for type uuid: ""
 hidden batch(es)