The backslash commands are part of the psql
client, not the PostgreSQL backend server. psql
translates them into batches of SQL, which you can see by running psql
with the -E
flag, and uses the results to produce the displayed output.
This means you can't use these commands from other clients.
Alongside the inability to use pg_dump
from within a PostgreSQL protocol session, or get equivalent functionality from the backend server, this is a bit of an FAQ.
At this point the only real option is to use a client that understands the information_schema
or PostgreSQL's catalogs (pg_catalog
) and can produce the display you want its self. A popular choice is PgAdmin-III, though I stick with psql
myself.