Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

ex: update flyway_schema_history set checksum = -673794054 where version = '000003';


Query using JSON field

select * from users where attributes->>'name' like '%johnmx%';



Common Commands

Command

Description

\l

\list

\l+

List databases


List with additional information

\dtList all tables in the current database

\d

\d+

List all tables, views and sequences
\connect database_nameConnect to the database

\d table

Describe table
select usename from pg_userList users
\dnList schemas

show search_path;

display current search path/schema

set search_path to <schema>;

switch to schema

...