Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TVueD-00040J-Tn for pgsql-admin@postgresql.org; Wed, 07 Nov 2012 01:41:42 +0000 Received: from mail-pa0-f46.google.com ([209.85.220.46]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TVue9-0005XQ-PT for pgsql-admin@postgresql.org; Wed, 07 Nov 2012 01:41:40 +0000 Received: by mail-pa0-f46.google.com with SMTP id hz1so759985pad.19 for ; Tue, 06 Nov 2012 17:41:34 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:x-enigmail-version:content-type :x-gm-message-state; bh=83OdIMArpWfXj9s0tNiBWH8Y3ZUEF9wIf5Z8tmlhrR4=; b=VnaocjTjbyStwpYZBHCR5SqOcvq3TPIGaf1tJFO0SgbBxAmfB9cpkyNA5ZbJ4ZF8GP 5VZzgC5ZXCf0B5Z+ICbzazD2aep24edYuDw2USLKq6klwXFiPPCySA6iD1cIDGHiGp51 If8R7aEi8vADNNZ++o8+ePwiBHy+0lbF2f+Hj+TY21fPH6DiZw5dYMEpZrEfiDcJpFZ0 VHGD9lw+2ZCzjZMf8j0bWtSuSk2kYz8xBOuKzYCDTk5iT41QowRu8IiuySHwq2DSujVF biYG6AjcRLLSnsE3p623rMRZeSG2ilkAzcUoDaNAJsdKSPD9fs1O5X8/YVzBsgYuxCk6 XW4Q== Received: by 10.68.209.136 with SMTP id mm8mr8724474pbc.146.1352252494249; Tue, 06 Nov 2012 17:41:34 -0800 (PST) Received: from ayaki.localdomain (124-148-90-153.dyn.iinet.net.au. [124.148.90.153]) by mx.google.com with ESMTPS id rk17sm1810391pbb.3.2012.11.06.17.41.31 (version=SSLv3 cipher=OTHER); Tue, 06 Nov 2012 17:41:33 -0800 (PST) Message-ID: <5099BC48.6090202@ringerc.id.au> Date: Wed, 07 Nov 2012 09:41:28 +0800 From: Craig Ringer User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:16.0) Gecko/20121016 Thunderbird/16.0.1 MIME-Version: 1.0 To: Igor Neyman CC: "pgsql-admin@postgresql.org" Subject: Re: unlooged tables References: In-Reply-To: X-Enigmail-Version: 1.4.5 Content-Type: multipart/alternative; boundary="------------060404040907010503090205" X-Gm-Message-State: ALoCoQndJzGVQSCpNqWMsHG1siW5WII8EjnTLbBlotJcJtpicirBBmzpiIYcnRJBeuXnwqw9yacc X-Pg-Spam-Score: -1.9 (-) X-Archive-Number: 201211/37 X-Sequence-Number: 40282 This is a multi-part message in MIME format. --------------060404040907010503090205 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit 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 --------------060404040907010503090205 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit
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
--------------060404040907010503090205--