psql command-line tool

psql is the command-line front end to PostreSQL. This page describes the psql commands that the Cloud Spanner PostgreSQL interface supports.

Meta-commands

The Cloud Spanner PostgreSQL interface supports the following psql meta-commands categories:

  • General
  • Help
  • Query Buffer
  • Input/Output (except \copy)
  • Conditional
  • Informational (some \d commands only)
  • Formatting
  • Operating System
  • Variables

The following categories are not supported:

  • Connection
  • Large Objects

The following informational commands are supported:

Command Description
\d List tables (excluding system tables)
\d table List table columns
\dt List tables in all schemas (detailed)
\dt table List table (detailed)
\dn List schemas