pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Justin Pryzby <pryzby@telsasoft.com>
To: Alvaro Herrera <alvherre@2ndquadrant.com>
Cc: PostgreSQL Hackers <pgsql-general@postgresql.org>
Subject: Re: ALTER TABLE SET (toast.asdf) is not rejected ... if a table has no toast
Date: Fri, 15 Jun 2018 18:50:11 -0500
Message-ID: <20180615235011.GA2327@telsasoft.com> (raw)
In-Reply-To: <20180611154759.rk4df3wuaovq3b4u@alvherre.pgsql>
References: <20180611133318.GY10885@telsasoft.com>
	<20180611154759.rk4df3wuaovq3b4u@alvherre.pgsql>

On Mon, Jun 11, 2018 at 11:47:59AM -0400, Alvaro Herrera wrote:
> On 2018-Jun-11, Justin Pryzby wrote:
> 
> > I noticed that this is accepted:
> > 
> > postgres=# ALTER TABLE t SET (toast.asdf=128);
> > ALTER TABLE
> > 
> > I thought since "toast" was a core namespace, it would've been rejected?
> > 
> > I recall having read a discussion about verifying these ... I wasn't able
> > to find what I was thinking of, but found this one.
> > https://www.postgresql.org/message-id/flat/20090114144332.GF24156%40alvh.no-ip.org

> 
> Uh.  ISTM that this was lost during the 9.4 cycle, because that command *is*
> rejected in 9.3.
> alvherre=# ALTER TABLE t SET (toast.asdf=128);
> ERROR:  unrecognized parameter "asdf"

I'm assuming your "t" has a toast table.  I think this is properly rejected
when toast exists.

It looks like we were maybe both (partially?) fooled by behavior that's been
discussed multiple times over the years: SET (toast.*) is ignored for tables
which don't currently have any TOAST.
https://www.postgresql.org/message-id/flat/20090211194311.GP8924%40alvh.no-ip.org

Maybe all's well, but I suggest there's maybe an question which hasn't been
previously been disambiguated and raised: if a table has no toast, should SET
(toast.JUNK) be ignored, or rejected ?

BTW maybe I was originally thinking of this:
https://www.postgresql.org/message-id/flat/c4d71df2-9e0e-3912-dc81-9a72e080c238%40lab.ntt.co.jp#c4d7...

Justin




view thread (3+ messages)

Message-ID: <20180615235011.GA2327@telsasoft.com>
Permalink:  ../20180615235011.GA2327@telsasoft.com/
Also on:    postgresql.org/message-id/20180615235011.GA2327@telsasoft.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: pryzby@telsasoft.com, alvherre@2ndquadrant.com
  Subject: Re: ALTER TABLE SET (toast.asdf) is not rejected ... if a table has no toast
  In-Reply-To: <20180615235011.GA2327@telsasoft.com>
  References: <20180611133318.GY10885@telsasoft.com> <20180611154759.rk4df3wuaovq3b4u@alvherre.pgsql> <20180615235011.GA2327@telsasoft.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox