Skip to main content
Filter by
Sorted by
Tagged with
2 votes
3 answers
82 views

postgres - unique index on master linked to unique constraints on partitions

I have a unique index on the master. On the partitions, I have a unique constraint linked to the unique index. I would like to promote the unique index on the master to a unique constraint so that new ...
Peter's user avatar
  • 1,407
1 vote
1 answer
76 views

How to improve Postgres pg_trgm for text similarity and make more similar text rank higher?

I am using Postgres's pg_trgm for finding similarity of alphanumeric text based on trigram matching. The text being searched on is a title column containing various titles of news articles. SELECT ...
sudoExclamationExclamation's user avatar
1 vote
3 answers
132 views

Is there a way to prevent ROW_NUMBER's ORDER BY from having to repeat the same thing?

I currently have this SQL: select ROW_NUMBER() OVER (order by priority DESC NULLS LAST, created_at DESC) as index , id , title , ago(created_at) ,...
sudoExclamationExclamation's user avatar