Skip site navigation (1) Skip section navigation (2)

Scripts (was Re: [HACKERS] Re: [INTERFACES] Next release is 7.0(?))

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us>
Cc: Thomas Lockhart <lockhart(at)alumni(dot)caltech(dot)edu>, "Sergio A(dot) Kessler" <ser(at)perio(dot)unlp(dot)edu(dot)ar>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, PostgreSQL-interfaces <pgsql-interfaces(at)postgresql(dot)org>
Subject: Scripts (was Re: [HACKERS] Re: [INTERFACES] Next release is 7.0(?))
Date: 1999-10-11 20:57:51
Message-ID: Pine.LNX.4.10.9910112232220.832-100000@peter-e.yi.org (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-interfaces
On Oct 11, Bruce Momjian mentioned:

> > > Yes, we have discussed this, and will add it to the TODO list.
> > > > can the commands createuser and destroyuser be renamed to
> > > > pg_createuser and pg_destroyuser (as pg_dump) adding soft links to
> > > > preserve backwards compatibility (declaring previous commands
> > > > deprecated) ?
> > > > the same can be done for createdb and destroydb ...
> > 
> > I hope we don't have a consensus on this. Long commands with
> > underscores in them are certainly another sign of the coming
> > apocalypse ;)
> 
> But if we keep symlinks to the existing names, is that OK?

I think Thomas' primary problem was the underscore. (?)

I was going to say that I can take of that, since I was going to adjust
the scripts to play well with the new psql anyway. (In particular, I just
terminally removed the -a option, since it has gone unused for a while and
might be a very popular option switch in the future. Switches are becoming
scarce these days.)

I can offer the following plan (from my bin dir):

cleardbdir	--> (Remove. It's been a while.)
createdb	--> pgcreatedb
createlang	--> (In my excessively undereducated opinion, this should
                     be removed. createdb and createuser I can see but
                     this?)
createuser      --> pgcreateuser
destroydb       --> pgdestroydb
destroylang     --> (see above)
destroyuser     --> pgdestroyuser
ecpg
initdb          --> pginitdb
initlocation    --> pginitlocation
ipcclean        --> pg_ipcclean
(An underscore here to make it more complicated to type :)
. . .
vacuumdb	--> pgvacuumdb

Alternatively, there could also be shorter commands, now that the
association with the PostgreSQL installation is clearer:
pgcrdb
pgcruser
pgdestdb
pgdestuser
pgvacuum

This might remove the mnemonic association with the related SQL commands
(which some might find desirable). Some might also go for a set like this:
pguseradd
pguserdel
pgmkdb
pgrmdb
in association to *nix commands. (Some might find that a bad idea).

Furthermore I was thinking about a configure switch along the following
lines:

--enable-scripts=old|new|both|none
(defaults to new)

since a while back there was some talk about removing the scripts
altogether (which also died after Thomas protested, I think).

While we're at it, perhaps the scripts can also be moved around in the
source tree, e.g., to bin/scripts or (if there will really be only 4 or 5)
even into the psql subtree.

Well, unless someone vetos, I would take a vote here and see what I can
do.

	-Peter

-- 
Peter Eisentraut                  Sernanders vaeg 10:115
peter_e(at)gmx(dot)net                   75262 Uppsala
http://yi.org/peter-e/            Sweden


In response to

Responses

pgsql-hackers by date

Next:From: Peter EisentrautDate: 1999-10-11 21:07:03
Subject: Regression tests (was Re: [HACKERS] psql and comments)
Previous:From: Bruce MomjianDate: 1999-10-11 20:51:46
Subject: Re: [HACKERS] Re: [INTERFACES] Next release is 7.0(?)

pgsql-interfaces by date

Next:From: Bruce MomjianDate: 1999-10-11 22:24:17
Subject: Re: Scripts (was Re: [HACKERS] Re: [INTERFACES] Next release is 7.0(?))
Previous:From: Bruce MomjianDate: 1999-10-11 20:51:46
Subject: Re: [HACKERS] Re: [INTERFACES] Next release is 7.0(?)

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group