Re: PostgreSQL reference coffee mug

Поиск
Список
Период
Сортировка
От Rory Campbell-Lange
Тема Re: PostgreSQL reference coffee mug
Дата
Msg-id 20210729191249.GA20309@campbell-lange.net
обсуждение исходный текст
Ответ на Re: PostgreSQL reference coffee mug  (Matthias Apitz <guru@unixarea.de>)
Ответы Re: PostgreSQL reference coffee mug  (Matthias Apitz <guru@unixarea.de>)
Список pgsql-general
On 29/07/21, Matthias Apitz (guru@unixarea.de) wrote:
> El día miércoles, julio 28, 2021 a las 07:30:24p. m. +0200, Matthias Apitz escribió:

> Resulted, that the size can be 20.12cm X 7.5cm. Attached is an updated
> version as PDF. Hints/bugs are welcome.

I personally find that, after \l (list databases), connecting to a different
one with \c is pretty useful.

\? : to list help subjects
\? options
\? variables
\h 

\watch [SEC] : is helpful, for example for keeping an eye on connections via pg_stat_activity

\e | \ef | \ev : is incredibly helpful if you are working on a query, function or view which you immediately want to
loadinto the database via the query buffer (setting the EDITOR env will help). Best done in production, of course.
 

\set ON_ERROR_STOP on : to abort on first error

\timing on : very helpful to see how fast or slowly your function or query runs

Perhaps some example pg_stat_activity calls might be worth list, eg:

    SELECT pid, age(clock_timestamp(), query_start), usename, query
    FROM pg_stat_activity
    WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%'
    ORDER BY query_start desc;
    # https://gist.github.com/rgreenjr/3637525

Rory




В списке pgsql-general по дате отправления:

Предыдущее
От: Matthias Apitz
Дата:
Сообщение: Re: PostgreSQL reference coffee mug
Следующее
От: Bhavesh Mistry
Дата:
Сообщение: Re: Issue with PSQL JDBC Driver Null Pointer