pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
ALTER TABLE SET (toast.asdf) is not rejected
3+ messages / 2 participants
[nested] [flat]

* ALTER TABLE SET (toast.asdf) is not rejected
@ 2018-06-11 13:33 Justin Pryzby <pryzby@telsasoft.com>
  2018-06-11 15:47 ` Re: ALTER TABLE SET (toast.asdf) is not rejected Alvaro Herrera <alvherre@2ndquadrant.com>
  0 siblings, 1 reply; 3+ messages in thread

From: Justin Pryzby @ 2018-06-11 13:33 UTC (permalink / raw)
  To: pgsql-general

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

Justin




^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: ALTER TABLE SET (toast.asdf) is not rejected
  2018-06-11 13:33 ALTER TABLE SET (toast.asdf) is not rejected Justin Pryzby <pryzby@telsasoft.com>
@ 2018-06-11 15:47 ` Alvaro Herrera <alvherre@2ndquadrant.com>
  2018-06-15 23:50   ` Re: ALTER TABLE SET (toast.asdf) is not rejected ... if a table has no toast Justin Pryzby <pryzby@telsasoft.com>
  0 siblings, 1 reply; 3+ messages in thread

From: Alvaro Herrera @ 2018-06-11 15:47 UTC (permalink / raw)
  To: Justin Pryzby <pryzby@telsasoft.com>; +Cc: pgsql-general

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"

but 9.4 takes it.  Weird.

-- 
Álvaro Herrera                https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services




^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: ALTER TABLE SET (toast.asdf) is not rejected ... if a table has no toast
  2018-06-11 13:33 ALTER TABLE SET (toast.asdf) is not rejected Justin Pryzby <pryzby@telsasoft.com>
  2018-06-11 15:47 ` Re: ALTER TABLE SET (toast.asdf) is not rejected Alvaro Herrera <alvherre@2ndquadrant.com>
@ 2018-06-15 23:50   ` Justin Pryzby <pryzby@telsasoft.com>
  0 siblings, 0 replies; 3+ messages in thread

From: Justin Pryzby @ 2018-06-15 23:50 UTC (permalink / raw)
  To: Alvaro Herrera <alvherre@2ndquadrant.com>; +Cc: pgsql-general

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




^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2018-06-15 23:50 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2018-06-11 13:33 ALTER TABLE SET (toast.asdf) is not rejected Justin Pryzby <pryzby@telsasoft.com>
2018-06-11 15:47 ` Alvaro Herrera <alvherre@2ndquadrant.com>
2018-06-15 23:50   ` Re: ALTER TABLE SET (toast.asdf) is not rejected ... if a table has no toast Justin Pryzby <pryzby@telsasoft.com>

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