Обсуждение: unlooged tables

Поиск
Список
Период
Сортировка

unlooged tables

От
Igor Neyman
Дата:

Hi,

 

Where in pg_catalog I can find, if the table was created as “unlogged” (or not)?

As in: create unlogged table t1(c1 int);

I can’t seem to find this info in pg_catalog tables/views.

 

Tried psql with –E to describe (\d) unlogged table, but it was not helpful.

 

Regards,

Igor Neyman

Re: unlooged tables

От
Igor Neyman
Дата:
From: Igor Neyman
Sent: Tuesday, November 06, 2012 4:09 PM
To: pgsql-admin@postgresql.org
Subject: unlooged tables

Hi,

Where in pg_catalog I can find, if the table was created as "unlogged" (or not)?
As in: create unlogged table t1(c1 int);
I can't seem to find this info in pg_catalog tables/views.

Tried psql with -E to describe (\d) unlogged table, but it was not helpful.

Regards,
Igor Neyman

Sorry for the noise.
As soon as previous message was sent I found it:

relpersistence column in pg_class ("u" for unlogged tables, "p" - for "normal" tables)

Igor N.


Re: unlooged tables

От
Craig Ringer
Дата:
On 11/07/2012 05:09 AM, Igor Neyman wrote:

Hi,

 

Where in pg_catalog I can find, if the table was created as “unlogged” (or not)?

As in: create unlogged table t1(c1 int);

I can’t seem to find this info in pg_catalog tables/views.

 

Tried psql with –E to describe (\d) unlogged table, but it was not helpful.


SELECT relpersistence FROM pg_class WHERE relname = 't1';

'u' is unlogged, 'p' is persistent, 't' is temporary.

See http://www.postgresql.org/docs/current/static/catalog-pg-class.html

--
Craig Ringer