ericj
ericj

Reputation: 2301

The client 'psql' truncates values in a column of type 'text'

I query pg_stat_activity. The column query is of type text. The queries can be very long.

The client psql truncates very long queries.

What should I do to see the full query?

Upvotes: 2

Views: 1551

Answers (1)

Vao Tsun
Vao Tsun

Reputation: 51599

psql does not. try running smth like

select lpad('a',3000,'b');

Instead it is limited in postgresql.conf, try:

b=# show track_activity_query_size;
 track_activity_query_size
---------------------------
 1024
(1 row)

According to docs:

track_activity_query_size (integer)

Specifies the number of bytes reserved to track the currently executing command for each active session, for the pg_stat_activity.query field. The default value is 1024. This parameter can only be set at server start.

Upvotes: 2

Related Questions