
what does the @> operator in postgres do? - Stack Overflow
May 2, 2016 · 106 I came across a query in postgres here which uses the @> operator on earth objects. I've searched everywhere, but have come up empty on the meaning of this operator …
sql - PostgreSQL IF statement - Stack Overflow
How can I do such query in Postgres? IF (select count(*) from orders) > 0 THEN DELETE from orders ELSE INSERT INTO orders values (1,2,3);
What is the difference between `->>` and `->` in Postgres SQL?
What is the difference between ->> and -> in SQL? In this thread (Check if field exists in json type column postgresql), the answerer basically recommends using, json->'attribute' is ...
Find the host name and port using PSQL commands
Apr 8, 2011 · I have PSQL running, and am trying to get a perl application connecting to the database. Is there a command to find the current port and host that the database is running on?
How to change owner of PostgreSQL database? - Stack Overflow
Nov 30, 2010 · postgres=# REASSIGN OWNED BY old_name TO new_name; This is a global equivalent of ALTER DATABASE command provided in Frank's answer, but instead of …
Postgres: INSERT if does not exist already - Stack Overflow
Nov 1, 2010 · In Postgres version 9.5 or higher you can use ON CONFLICT to avoid errors of contraints like @Arie mentioned above. To know more options related to this INSERT query …
What is the default password for Postgres - Stack Overflow
I have just installed Postgres 9.3 on Windows 7. The installation completed successfully. It has never asked me to provide the password for postgres user. The service postgresql-x64-9.3 is …
PostgreSQL permissions explained - Stack Overflow
Sep 6, 2014 · Please explain the output of the \\z command in PostgreSQL. I understand the permission, I read the documentation, but somehow I missed the interpretation of the output of …
sql - Right query to get the current number of connections in a ...
Mar 11, 2011 · Note that when the postgres command line tool, PSQL is used for executing this query, the total number of connections is the result of this query - 1 since the psql connection …
Using psql how do I list extensions installed in a database?
May 4, 2018 · How do I list all extensions that are already installed in a database or schema from psql? See also Finding a list of available extensions that PostgreSQL ships with