pg.ddx.io  pgsql-docs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
misleading ALTER TABLE SET STORAGE
3+ messages / 3 participants
[nested] [flat]

* misleading ALTER TABLE SET STORAGE
@ 2016-11-08 14:27  vodevsh@gmail.com
  0 siblings, 1 reply; 3+ messages in thread

From: vodevsh@gmail.com @ 2016-11-08 14:27 UTC (permalink / raw)
  To: pgsql-docs

The following documentation comment has been logged on the website:

Page: https://www.postgresql.org/docs/9.6/static/storage-toast.html
Description:

Hi,
Was reading
https://www.postgresql.org/docs/current/static/storage-toast.html and the
bit with "...table column can be altered with ALTER TABLE SET STORAGE..."
appeared misleading to me. You don't set storage per table you set it per
column, so "ALTER TABLE ... ALTER COLUMN SET STORAGE" would look more
appropriate. I even checked
https://www.postgresql.org/docs/9.6/static/sql-altertable.html where it
looks quite clear "ALTER [ COLUMN ] column_name SET STORAGE { PLAIN |
EXTERNAL | EXTENDED | MAIN }"...
Anyway, with all respect to pg documentation and pg in general, I think this
bit should look different.
Thank you!

-- 
Sent via pgsql-docs mailing list (pgsql-docs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-docs


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

* Re: misleading ALTER TABLE SET STORAGE
@ 2016-11-10 14:46  Euler Taveira <euler@timbira.com.br>
  parent: vodevsh@gmail.com
  0 siblings, 1 reply; 3+ messages in thread

From: Euler Taveira @ 2016-11-10 14:46 UTC (permalink / raw)
  To: vodevsh@gmail.com; pgsql-docs

On 08-11-2016 11:27, vodevsh@gmail.com wrote:
> The following documentation comment has been logged on the website:
> 
> Page: https://www.postgresql.org/docs/9.6/static/storage-toast.html
> Description:
> 
> Hi,
> Was reading
> https://www.postgresql.org/docs/current/static/storage-toast.html and the
> bit with &quot;...table column can be altered with ALTER TABLE SET STORAGE...&quot;
> appeared misleading to me. You don&#39;t set storage per table you set it per
> column, so &quot;ALTER TABLE ... ALTER COLUMN SET STORAGE&quot; would look more
> appropriate. I even checked
> https://www.postgresql.org/docs/9.6/static/sql-altertable.html where it
> looks quite clear &quot;ALTER [ COLUMN ] column_name SET STORAGE { PLAIN |
> EXTERNAL | EXTENDED | MAIN }&quot;...
> Anyway, with all respect to pg documentation and pg in general, I think this
> bit should look different.
> 
AFAICS ALTER TABLE SET STORAGE means ALTER TABLE ... ALTER COLUMN SET
STORAGE. There is no ALTER TABLE SET STORAGE per table. It seems you are
confusing with ALTER TABLE SET (storage_parameter = value, ...).

Perhaps, we should use the complete command (ALTER TABLE tablename ALTER
COLUMN colname SET STORAGE storagetype) or link ALTER TABLE to avoid
confusion.


-- 
   Euler Taveira                   Timbira - http://www.timbira.com.br/
   PostgreSQL: Consultoria, Desenvolvimento, Suporte 24x7 e Treinamento


-- 
Sent via pgsql-docs mailing list (pgsql-docs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-docs



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

* Re: misleading ALTER TABLE SET STORAGE
@ 2016-11-10 15:04  Tom Lane <tgl@sss.pgh.pa.us>
  parent: Euler Taveira <euler@timbira.com.br>
  0 siblings, 0 replies; 3+ messages in thread

From: Tom Lane @ 2016-11-10 15:04 UTC (permalink / raw)
  To: Euler Taveira <euler@timbira.com.br>; +Cc: vodevsh@gmail.com; pgsql-docs

Euler Taveira <euler@timbira.com.br> writes:
> On 08-11-2016 11:27, vodevsh@gmail.com wrote:
>> Was reading
>> https://www.postgresql.org/docs/current/static/storage-toast.html and the
>> bit with &quot;...table column can be altered with ALTER TABLE SET STORAGE...&quot;
>> appeared misleading to me.

> AFAICS ALTER TABLE SET STORAGE means ALTER TABLE ... ALTER COLUMN SET
> STORAGE. There is no ALTER TABLE SET STORAGE per table. It seems you are
> confusing with ALTER TABLE SET (storage_parameter = value, ...).

> Perhaps, we should use the complete command (ALTER TABLE tablename ALTER
> COLUMN colname SET STORAGE storagetype) or link ALTER TABLE to avoid
> confusion.

Our usual practice is to insert ellipses where there are omissions,
so this probably ought to read "ALTER TABLE ... SET STORAGE".  We could
go with "ALTER TABLE ... ALTER COLUMN ... SET STORAGE", but that's
more verbose and not any more correct.

A link might not be a bad thing either, but it's sort of an independent
question.

			regards, tom lane


-- 
Sent via pgsql-docs mailing list (pgsql-docs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-docs



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


end of thread, other threads:[~2016-11-10 15:04 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2016-11-08 14:27 misleading ALTER TABLE SET STORAGE vodevsh@gmail.com
2016-11-10 14:46 ` Euler Taveira <euler@timbira.com.br>
2016-11-10 15:04   ` Tom Lane <tgl@sss.pgh.pa.us>

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