Обсуждение: Discrepancy in 9.1 Documentation on CREATE ROLE

Поиск
Список
Период
Сортировка

Discrepancy in 9.1 Documentation on CREATE ROLE

От
Ron Adams
Дата:
The help for LOGIN/NOLOGIN at http://www.postgresql.org/docs/9.1/static/sql-createrole.html: "...NOLOGIN is the default, except when CREATE ROLE is invoked through its alternative spelling CREATE USER." The help for CREATE USER: "These clauses are an obsolete, but still accepted, spelling of SUPERUSER and NOSUPERUSER. Note that they are not equivalent to CREATEROLE as one might naively expect!" Eh?

Re: Discrepancy in 9.1 Documentation on CREATE ROLE

От
Robert Haas
Дата:
On Thu, Oct 6, 2011 at 10:48 PM, Ron Adams <ron@constellationmedia.com> wrote:
> The help for LOGIN/NOLOGIN at
> http://www.postgresql.org/docs/9.1/static/sql-createrole.html: "...NOLOGIN
> is the default, except when CREATE ROLE is invoked through its alternative
> spelling CREATE USER." The help for CREATE USER: "These clauses are an
> obsolete, but still accepted, spelling of SUPERUSER and NOSUPERUSER. Note
> that they are not equivalent to CREATEROLE as one might naively expect!" Eh?

OK, brace yourself...

You're mixing up the CREATEUSER option to the CREATE ROLE command with
the completely separate command CREATE USER.

See http://www.postgresql.org/docs/9.1/static/sql-createuser.html

I wonder if we ought to consider removing CREATEUSER and NOCREATEUSER
as synonyms for SUPERUSER and NOSUPERUSER.  It looks like that change
was made in 8.1, which is now EOL.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

Re: Discrepancy in 9.1 Documentation on CREATE ROLE

От
Ron Adams
Дата:
Ah, makes sense! Thank you. And for what it's worth coming from someone trying to pick all this up, I'd say that yes, it's rather confusing as is.


On Mon, Oct 10, 2011 at 13:34, Robert Haas <robertmhaas@gmail.com> wrote:
On Thu, Oct 6, 2011 at 10:48 PM, Ron Adams <ron@constellationmedia.com> wrote:
> The help for LOGIN/NOLOGIN at
> http://www.postgresql.org/docs/9.1/static/sql-createrole.html: "...NOLOGIN
> is the default, except when CREATE ROLE is invoked through its alternative
> spelling CREATE USER." The help for CREATE USER: "These clauses are an
> obsolete, but still accepted, spelling of SUPERUSER and NOSUPERUSER. Note
> that they are not equivalent to CREATEROLE as one might naively expect!" Eh?

OK, brace yourself...

You're mixing up the CREATEUSER option to the CREATE ROLE command with
the completely separate command CREATE USER.

See http://www.postgresql.org/docs/9.1/static/sql-createuser.html

I wonder if we ought to consider removing CREATEUSER and NOCREATEUSER
as synonyms for SUPERUSER and NOSUPERUSER.  It looks like that change
was made in 8.1, which is now EOL.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

Re: Discrepancy in 9.1 Documentation on CREATE ROLE

От
Bruce Momjian
Дата:
Robert Haas wrote:
> On Thu, Oct 6, 2011 at 10:48 PM, Ron Adams <ron@constellationmedia.com> wrote:
> > The help for LOGIN/NOLOGIN at
> > http://www.postgresql.org/docs/9.1/static/sql-createrole.html: "...NOLOGIN
> > is the default, except when CREATE ROLE is invoked through its alternative
> > spelling CREATE USER." The help for CREATE USER: "These clauses are an
> > obsolete, but still accepted, spelling of SUPERUSER and NOSUPERUSER. Note
> > that they are not equivalent to CREATEROLE as one might naively expect!" Eh?
>
> OK, brace yourself...
>
> You're mixing up the CREATEUSER option to the CREATE ROLE command with
> the completely separate command CREATE USER.
>
> See http://www.postgresql.org/docs/9.1/static/sql-createuser.html
>
> I wonder if we ought to consider removing CREATEUSER and NOCREATEUSER
> as synonyms for SUPERUSER and NOSUPERUSER.  It looks like that change
> was made in 8.1, which is now EOL.

Agreed.  They might still appear in dumps so maybe just remove
documentation about them.

--
  Bruce Momjian  <bruce@momjian.us>        http://momjian.us
  EnterpriseDB                             http://enterprisedb.com

  + It's impossible for everything to be true. +

Re: Discrepancy in 9.1 Documentation on CREATE ROLE

От
Robert Haas
Дата:
On Tue, Oct 11, 2011 at 10:44 AM, Bruce Momjian <bruce@momjian.us> wrote:
> Robert Haas wrote:
>> On Thu, Oct 6, 2011 at 10:48 PM, Ron Adams <ron@constellationmedia.com> wrote:
>> > The help for LOGIN/NOLOGIN at
>> > http://www.postgresql.org/docs/9.1/static/sql-createrole.html: "...NOLOGIN
>> > is the default, except when CREATE ROLE is invoked through its alternative
>> > spelling CREATE USER." The help for CREATE USER: "These clauses are an
>> > obsolete, but still accepted, spelling of SUPERUSER and NOSUPERUSER. Note
>> > that they are not equivalent to CREATEROLE as one might naively expect!" Eh?
>>
>> OK, brace yourself...
>>
>> You're mixing up the CREATEUSER option to the CREATE ROLE command with
>> the completely separate command CREATE USER.
>>
>> See http://www.postgresql.org/docs/9.1/static/sql-createuser.html
>>
>> I wonder if we ought to consider removing CREATEUSER and NOCREATEUSER
>> as synonyms for SUPERUSER and NOSUPERUSER.  It looks like that change
>> was made in 8.1, which is now EOL.
>
> Agreed.  They might still appear in dumps so maybe just remove
> documentation about them.

They shouldn't appear in any non-ancient dumps, and we don't guarantee
that those will work anyway: you're suppose to pg_dump with the new
version of pg_dump, running against the old cluster.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

Re: Discrepancy in 9.1 Documentation on CREATE ROLE

От
Bruce Momjian
Дата:
Robert Haas wrote:
> On Tue, Oct 11, 2011 at 10:44 AM, Bruce Momjian <bruce@momjian.us> wrote:
> > Robert Haas wrote:
> >> On Thu, Oct 6, 2011 at 10:48 PM, Ron Adams <ron@constellationmedia.com> wrote:
> >> > The help for LOGIN/NOLOGIN at
> >> > http://www.postgresql.org/docs/9.1/static/sql-createrole.html: "...NOLOGIN
> >> > is the default, except when CREATE ROLE is invoked through its alternative
> >> > spelling CREATE USER." The help for CREATE USER: "These clauses are an
> >> > obsolete, but still accepted, spelling of SUPERUSER and NOSUPERUSER. Note
> >> > that they are not equivalent to CREATEROLE as one might naively expect!" Eh?
> >>
> >> OK, brace yourself...
> >>
> >> You're mixing up the CREATEUSER option to the CREATE ROLE command with
> >> the completely separate command CREATE USER.
> >>
> >> See http://www.postgresql.org/docs/9.1/static/sql-createuser.html
> >>
> >> I wonder if we ought to consider removing CREATEUSER and NOCREATEUSER
> >> as synonyms for SUPERUSER and NOSUPERUSER. ?It looks like that change
> >> was made in 8.1, which is now EOL.
> >
> > Agreed. ?They might still appear in dumps so maybe just remove
> > documentation about them.
>
> They shouldn't appear in any non-ancient dumps, and we don't guarantee
> that those will work anyway: you're suppose to pg_dump with the new
> version of pg_dump, running against the old cluster.

Well, we have pg_dump support for 7.3 dumps (2002), so I don't see a
reason to remove that capability.  Now, if we want to remove that
support, then it would make sense to remove the rest, but I think people
are still assuming old dumps can load, especially if they have the dump
but not the 7.3 server installed.

--
  Bruce Momjian  <bruce@momjian.us>        http://momjian.us
  EnterpriseDB                             http://enterprisedb.com

  + It's impossible for everything to be true. +

Re: Discrepancy in 9.1 Documentation on CREATE ROLE

От
Tom Lane
Дата:
Bruce Momjian <bruce@momjian.us> writes:
> Robert Haas wrote:
>> On Tue, Oct 11, 2011 at 10:44 AM, Bruce Momjian <bruce@momjian.us> wrote:
>>> Robert Haas wrote:
>>>> I wonder if we ought to consider removing CREATEUSER and NOCREATEUSER
>>>> as synonyms for SUPERUSER and NOSUPERUSER. ?It looks like that change
>>>> was made in 8.1, which is now EOL.

>>> Agreed. ?They might still appear in dumps so maybe just remove
>>> documentation about them.

>> They shouldn't appear in any non-ancient dumps, and we don't guarantee
>> that those will work anyway: you're suppose to pg_dump with the new
>> version of pg_dump, running against the old cluster.

> Well, we have pg_dump support for 7.3 dumps (2002), so I don't see a
> reason to remove that capability.  Now, if we want to remove that
> support, then it would make sense to remove the rest, but I think people
> are still assuming old dumps can load, especially if they have the dump
> but not the 7.3 server installed.

I think removing them from the docs but continuing to accept them makes
sense.  We do still hear from people migrating from 7.4 or older, and
it's not always going to be practical for them to make a dump with a
newer pg_dump.

            regards, tom lane

Re: Discrepancy in 9.1 Documentation on CREATE ROLE

От
Robert Haas
Дата:
On Tue, Oct 11, 2011 at 11:59 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Bruce Momjian <bruce@momjian.us> writes:
>> Robert Haas wrote:
>>> On Tue, Oct 11, 2011 at 10:44 AM, Bruce Momjian <bruce@momjian.us> wrote:
>>>> Robert Haas wrote:
>>>>> I wonder if we ought to consider removing CREATEUSER and NOCREATEUSER
>>>>> as synonyms for SUPERUSER and NOSUPERUSER. ?It looks like that change
>>>>> was made in 8.1, which is now EOL.
>
>>>> Agreed. ?They might still appear in dumps so maybe just remove
>>>> documentation about them.
>
>>> They shouldn't appear in any non-ancient dumps, and we don't guarantee
>>> that those will work anyway: you're suppose to pg_dump with the new
>>> version of pg_dump, running against the old cluster.
>
>> Well, we have pg_dump support for 7.3 dumps (2002), so I don't see a
>> reason to remove that capability.  Now, if we want to remove that
>> support, then it would make sense to remove the rest, but I think people
>> are still assuming old dumps can load, especially if they have the dump
>> but not the 7.3 server installed.
>
> I think removing them from the docs but continuing to accept them makes
> sense.  We do still hear from people migrating from 7.4 or older, and
> it's not always going to be practical for them to make a dump with a
> newer pg_dump.

Personally, I loathe all that is undocumented.  But that might just be me.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

Re: Discrepancy in 9.1 Documentation on CREATE ROLE

От
Tom Lane
Дата:
Robert Haas <robertmhaas@gmail.com> writes:
> On Tue, Oct 11, 2011 at 11:59 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> I think removing them from the docs but continuing to accept them makes
>> sense. �We do still hear from people migrating from 7.4 or older, and
>> it's not always going to be practical for them to make a dump with a
>> newer pg_dump.

> Personally, I loathe all that is undocumented.  But that might just be me.

Well, could we bury the documentation in some corner where newbies
wouldn't find it?

            regards, tom lane

Re: Discrepancy in 9.1 Documentation on CREATE ROLE

От
Robert Haas
Дата:
On Wed, Oct 12, 2011 at 12:59 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Robert Haas <robertmhaas@gmail.com> writes:
>> On Tue, Oct 11, 2011 at 11:59 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>>> I think removing them from the docs but continuing to accept them makes
>>> sense.  We do still hear from people migrating from 7.4 or older, and
>>> it's not always going to be practical for them to make a dump with a
>>> newer pg_dump.
>
>> Personally, I loathe all that is undocumented.  But that might just be me.
>
> Well, could we bury the documentation in some corner where newbies
> wouldn't find it?

Maybe.  At this point I'm inclined to think that what I already did
(turn the words "CREATE USER" into a link) is probably sufficient
given that we have only a single report of this being confusing.  I
didn't even back-patch it, since I can't remember any similar reports
in the past.  If it keeps coming up, then we might need to get out a
bigger hammer, but my reason for wanting to get rid of the options was
less about avoiding confusion than about thinking that they're likely
totally obsolete and worthless at this point; given that you and Bruce
disagree, I'd be inclined to just keep them for now and see if anyone
else complains.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company