On Sat, Mar 18, 2017 at 9:23 PM, Tom Lane <t...@sss.pgh.pa.us> wrote:

> Magnus Hagander <mag...@hagander.net> writes:
> > createuser, dropuser - definitely pollutes the namespace, people do
> > sometimes try them for the wrong thing. Unlike the db ones they do add
> > value though -- I don't think we have a psql way of in a single command
> > doing what --pwprompt on createuser does, do we? But given that we are in
> > the process of breaking a lot of other scripts for 10, perhaps we should
> > rename it to pg_createuser?
> I'm not particularly on board with arguments like "we already broke a ton
> of stuff so let's break some more".  Eventually you've managed to create
> a daunting barrier to upgrading at all.

The argument is more that if we are going to break it, now is a good time
to do it because we are already forcing people to review their scripts.

If we decide not to break it at all that's one thing. But if we *are* going
to break it, it's better to do it in 10 than in 11.

> I think a more reasonable way to proceed is to install symlinks
> pg_createuser -> createuser (or the other direction), mark the older names
> as deprecated, and announce that we'll remove the old names a few releases
> from now.  That gives people time to adjust.

I'd suggest doing it in the other direction, but yeah, that seems like a
softer way to handle it. As long as we clearly document them as such.
Perhaps we should even have them output a little "hey you should be using
pg_xyz" if they are used by the wrong name, but I wonder if that might
break things.

Maybe we should handle createdb likewise, rather than just kicking it to
> the curb.  I know I use it quite often; it's less typing than psql -c
> 'create database ...' postgres, and still would be with a pg_ prefix.

As long as they have a pg_ prefix, I don't see much harm in them being
there, they're tiny. It's not like they're a huge maintenance burden.

 Magnus Hagander
 Me: http://www.hagander.net/
 Work: http://www.redpill-linpro.com/

Reply via email to