|
- what does the @ gt; operator in postgres do? - Stack Overflow
The at sign (@) is optional noise The amounts of the different units are implicitly added with appropriate sign accounting ago negates all the fields This syntax is also used for interval output, if IntervalStyle is set to postgres_verbose
- syntax - What does :: do in PostgreSQL? - Stack Overflow
A type cast specifies a conversion from one data type to another PostgreSQL accepts two equivalent syntaxes for type casts, the PostgreSQL-specific value::type and the SQL-standard CAST(value AS type)
- What is the difference between `- gt; gt;` and `- gt;` in Postgres SQL?
Postgres offers 2 operators to get a JSON member: the arrow operator: -> returns type JSON or JSONB; the double arrow operator: ->> returns type text; We must also understand that we now have 2 different kinds of null: (null) postgres null type; null json b null type; I created an example on jsfiddle Let's create a simple table with a JSONB field:
- Meaning of different command line prompts in PostgreSQL?
psql (9 1 10) Type "help" for help postgres=# CREATE DATABASE exampledb postgres-# After I entered the CREATE DB command the prompt changed from ending with "=#" to "-#" I would like to know what this change means and what the implications are for receiving and processing commands
- How to detect query which holds the lock in Postgres?
Postgres has a very rich system catalog exposed via SQL tables PG's statistics collector is a subsystem that supports collection and reporting of information about server activity Now to figure out the blocking PIDs you can simply query pg_stat_activity
- Using psql how do I list extensions installed in a database?
psql -h localhost -d postgres -U username -E with an -E switch which gives you the details of the hidden commands that any alias is using Once you are IN you can simply do a \dx which gives you this:
- Postgresql SELECT if string contains - Stack Overflow
One thing non-intuitive thing is that for postgres, position is 1 based, not 0 based For example select position('a' in 'abc') returns 1 And if there is no match it returns 0
- What is the default username and password for PostgreSQL?
If you decide to risk changing the postgres user's password, stop the application and PostgreSQL service, and then edit pg_hba conf Add (or change if it already exists) a line (if it doesn't exist, add it before any other "host " lines): host all all 127 0 0 1 32 trust And restart the PostgreSQL service
|
|
|