Marko Kreen wrote:
> On Thu, Dec 13, 2001 at 05:47:37AM +0000, Thomas Lockhart wrote:
> > > > > * make createlang match docs: "createlang dbname" did not work.
> > > > What is the meaning of that command?
> > > You give a database to act on, like to other scripts, then it
> > > asks what language to install.
> > But since it respects PGHOST and should use a database name the same as
> > your user name, that usage is degenerate with "createlang newlanguage".
> > Isn't it? Or shouldn't it be?
> Well, it does not respect PGDATABASE nor uses username as
> default - and making it do so changes the current behaviour...
> Although I think too 'createlang langname' would be saner.
I was going to add this to TODO:
Change 'createlang [langname] dbname' to 'createlang langname [dbname]'
However, when I started to look at the createlang script, I saw:
if [ "$list" != "t" ]
if [ "$2" ]
which said that dbname was already behaving as optional, even though
there was code to handle a missing langname.
Rather than change the script to make langname optional, I have fixed
the script to work the way everyone wants it to work, namely dbname is
now optional. I grabbed the dbname default code from createdb.
Applied to CVS with doc updates. Patch attached.
Also, can someone explain why we have a createlang.sh? Makefile shows:
cp $< $@
chmod a+x $@
Not much doing there.
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
In response to
pgsql-patches by date
|Next:||From: Bruce Momjian||Date: 2002-01-03 05:33:04|
|Subject: Re: make createlang match docs|
|Previous:||From: Tom Lane||Date: 2002-01-02 22:10:29|
|Subject: Re: [SQL] Unpredictable text -> date implicit casting behaviour/to_date bug |