Metadata PostgreSQL commands in Query Service

For metadata on your dataset, the following PostgreSQL commands are currently supported for querying:


The commands listed below are case sensitive.

Command Description
\conninfo Outputs information about the current database connection.
\d Displays a list of all visible tables, views, materialized views, sequences, and foreign tables.
\dE Displays a list of foreign tables.
\df or \df+ Displays a list of functions.
\di Displays a list of indexes.
\dm Displays a list of materialized views.
\dn Displays a list of schemas (namespaces).
\ds Displays a list of sequences.
\dS Displays a list of PostgreSQL-defined tables.
\dt Displays a list of tables.
\dT Displays a list of data types.
\dv Displays a list of views.
\encoding Lists the current client character set encoding.
\errverbose Repeats the most recent server error message at maximum verbosity.
\l or \list Displays a list of databases in the server.
\set Displays the names and values of all current psql variables.
\showtables Shows the following information:
name: The name by which the table will be referred to.
datasetId: The ID of the dataset which is stored.
dataset: The name of the dataset which is stored.
description: A description of the dataset.
resolved: A boolean value which states whether or not the dataset is resolved in the current session.
\timing Toggles the display between on and off. The display is in milliseconds. Intervals longer than one second are shown in minutes:seconds format, with hours and days fields added when needed.

All of the commands that start with \d can be combined. For example, you can issue \dtsn to display a list of all tables, sequences, and schemas. \d by itself shows all visible tables, views, materialized views, and sequences.

For additional information about the commands listed above, please refer to the documentation at However, please be aware that not all the options shown in the PostgreSQL documentation are supported by Experience Platform.

On this page