Question : I had dropped a database a couple weeks ago but it still shows with l. I’ve tried using […]
Category: Postgresql
Indexes not used with OR
Question : I have query such as this: SELECT t0.id FROM platform_conversations t0 LEFT OUTER JOIN contacts t1 ON t1.id […]
Count rows for each latest status of tickets
Question : ticket_number | datetime | status —————+—————————-+——— 1 | 2020-08-03 03:52:58.048196 | replied 1 | 2020-08-02 19:55:49.121455 | new […]
Optimize a postgresql database view query
Question : Given the following database schema (using rails-like associations, as this is a ruby-on-rails project, also please forgive me […]
PostgreSQL Trigger to Update Inserted Row With Data From Another Table
Question : I have 2 tables in PostgreSQL-12, SENSORS (receives timeseries data feed from sensors) and LABELS (contains sensor labels […]
Can I use row-level-security for application users?
Question : For my webservice I use a PostgreSQL database which supports row-level-security to prevent users accessing rows of a […]
Postgres JSONB – Flatten nested objects and groupings
Question : As i’ve learned, if i need to flatten a JSON contained in a specific field of my postgres […]
psql with ‘-c’ option or ‘-f’ option is not terminating properly
Question : When I run a command such psql -d database -c ‘select * from table’ or psql -d database […]
PostgreSQL 11 – Can I turn a schema into the wild west?
Question : I have been given a task to set up a development database where all users able to access […]
High Availability for MariaDB and Postgres : replication or active-passive (SAN)
Question : During the last weeks I did a lot of research on High Availability for Postgres and MariaDB. Both […]