Re: [GSoC2014] Patch ALTER TABLE ... SET LOGGED

From: Fabrízio de Royes Mello <fabriziomello(at)gmail(dot)com>
To: Christoph Berg <cb(at)df7cb(dot)de>, Thom Brown <thom(at)linux(dot)com>, Fabrízio Mello <fabriziomello(at)gmail(dot)com>, Andres Freund <andres(at)2ndquadrant(dot)com>, Pgsql Hackers <pgsql-hackers(at)postgresql(dot)org>, Stephen Frost <sfrost(at)snowman(dot)net>
Subject: Re: [GSoC2014] Patch ALTER TABLE ... SET LOGGED
Date: 2014-08-21 13:45:16
Message-ID: CAFcNs+oc1aQLm1etUp6Gsun4F_VdcmsH0TKJK4yyB5PGQZvAcg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Aug 21, 2014 at 5:23 AM, Christoph Berg <cb(at)df7cb(dot)de> wrote:
>
> Re: Thom Brown 2014-08-20 <CAA-aLv7TeF8iM=
7U7TsgL4S5Jh1a+shQ_Ny7gOrZc_g_YJ7uKA(at)mail(dot)gmail(dot)com>
> > "ERROR: table test is not permanent"
> >
> > Perhaps this would be better as "table test is unlogged" as "permanent"
> > doesn't match the term used in the DDL syntax.
>
> I was also wondering that, but then figured that when ALTER TABLE SET
> UNLOGGED is invoked on temp tables, the error message "is not
> permanent" was correct while the apparent opposite "is unlogged" is
> wrong.
>
> Christoph
> --
> cb(at)df7cb(dot)de | http://www.df7cb.de/

Thom,

Christoph is right... make no sense the message... see the example:

fabrizio=# create temp table foo();
CREATE TABLE
fabrizio=# alter table foo set unlogged;
ERROR: table foo is unlogged

The previous message is better:

fabrizio=# create temp table foo();
CREATE TABLE
fabrizio=# alter table foo set unlogged;
ERROR: table foo is not permanent
fabrizio=#
fabrizio=# create unlogged table foo2();
CREATE TABLE
fabrizio=# alter table foo2 set unlogged;
ERROR: table foo2 is not permanent

Patch attached.

Regards,

--
Fabrízio de Royes Mello
Consultoria/Coaching PostgreSQL
>> Timbira: http://www.timbira.com.br
>> Blog: http://fabriziomello.github.io
>> Linkedin: http://br.linkedin.com/in/fabriziomello
>> Twitter: http://twitter.com/fabriziomello
>> Github: http://github.com/fabriziomello

Attachment Content-Type Size
gsoc2014_alter_table_set_logged_v12.patch text/x-diff 28.5 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Thom Brown 2014-08-21 14:04:56 Re: [GSoC2014] Patch ALTER TABLE ... SET LOGGED
Previous Message Andrew Dunstan 2014-08-21 13:18:22 Re: Removing dependency to wsock32.lib when compiling code on WIndows