Re: CREATE TABLE fails - Mailing list pgsql-general

From Sahul Hameed
Subject Re: CREATE TABLE fails
Date
Msg-id CAGcyALQDJOJz6vK3nEpzSsTWpchcGQGV6i-3iiycNtq1WbcLPA@mail.gmail.com
Whole thread
In response to CREATE TABLE fails  (Igor Korot <ikorot01@gmail.com>)
Responses Re: CREATE TABLE fails
List pgsql-general
The problem is that you're putting the WITH clause on the PRIMARY KEY constraint, which applies to the index, not the table. 

CREATE TABLE leagues_new(id serial, name varchar(100),
    drafttype smallint,scoringtype smallint,roundvalues smallint,
    leaguetype char(5),salary integer,benchplayers smallint,primary 
key(id) INCLUDE (drafttype, scoringtype)) WITH( fillfactor = 50, autovacuum_enabled = true );

--Sahul 

On Sun, Mar 8, 2026 at 10:10 PM Igor Korot <ikorot01@gmail.com> wrote:
Hi, ALL,

[quote]
draft=# CREATE TABLE leagues_new(id serial, name varchar(100),
drafttype smallint, scoringtype smallint, roundvalues smallint,
leaguetype char(5), salary integer, benchplayers smallint, primary
key(id) INCLUDE (drafttype, scoringtype) WITH( fillfactor = 50,
autovacuum_enabled ));
ERROR:  unrecognized parameter "autovacuum_enabled"
[/quote]

But the page at
https://www.postgresql.org/docs/16/sql-createtable.html#SQL-CREATETABLE-STORAGE-PARAMETERS
says it's available.

What am I missing?

Thank you.


pgsql-general by date:

Previous
From: Ron Johnson
Date:
Subject: Re: CREATE TABLE fails
Next
From: Igor Korot
Date:
Subject: Re: CREATE TABLE fails