Question : This query works, but uses TO_CHAR(date_created, ‘YYYY’) three times. Is there a way to simplify this query? SELECT […]
Category: Postgresql
How to deal with large offsets in select?
Question : Table jtest with 200k rows, each row contains jsonb { id: “<uuid>”, key: <index> } (<index> is integer […]
How to copy part of a database with inconsistent privileges?
Question : I have a Postgres database and I would like to copy certain tables from a single schema into […]
Increasing TransactionLogsDiskUsage in postgresql 11.12 RDS instance [duplicate]
Question : This question already has an answer here: RDS Postgres oldest replication lag increases during inactivity even though Fivetran […]
how to select records from two columns where one column consist word from second column?
Question : In postgres I want to select rows where column1 matches column2 for corresponding row and returns result having […]
How to get users by specified tag?
Question : I have 3 tables users, tags, user_tags. I try to fetch users with theirs tags with next query: […]
REST webservice as a Foreign Data Wrapper in postgresql
Question : I know it’s possible to embed data from a foreign resource in a postgresql database as a foreign […]
Querying on multiple joined rows
Question : I have a table called visits that is structured like so: +—-+————–+————-+ | id | name | visitor_id […]
Querying the most recent records with two fields: datestamp and timestamp
Question : I have a table called airquality that has records for air quality measurements taken on different days and […]
Question regarding PSQLException: User was holding shared buffer pin for too long
Question : I recently encountered a strange error that I don’t quite understand what could cause it: caused by org.postgresql.util.PSQLException: […]