Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
create table model(
id serial primary key,
name text,
tags text[]
);
insert into model(name, tags) values ('a', array['a', 'b', 'c']);
insert into model(name, tags) values ('b', array['b', 'b', 'c']);
select unnest(tags) as tag, count(*) from model group by tag;
select * from model where id = 1;
select pg_current_wal_lsn();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment