Обсуждение: Updated TODO item

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

Updated TODO item

От
Bruce Momjian
Дата:
TODO:  I have added a syntax suggested by someone on IRC:

* Make it easier to create a database owned by someone who can't createdb, perhaps CREATE DATABASE dbname WITH USER =
"user"^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 

--  Bruce Momjian                        |  http://candle.pha.pa.us pgman@candle.pha.pa.us               |  (610)
853-3000+  If your life is a hard drive,     |  830 Blythe Avenue +  Christ can be your backup.        |  Drexel Hill,
Pennsylvania19026
 


Re: Updated TODO item

От
Thomas Swan
Дата:
Bruce Momjian wrote:

>TODO:  I have added a syntax suggested by someone on IRC:
>
>* Make it easier to create a database owned by someone who can't createdb,
>  perhaps CREATE DATABASE dbname WITH USER = "user"
>  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>
Perhaps  "CREATE DATABASE dbname WITH USER username" would fit a little 
better.   I'd love to see this one get done... ;-)




Re: Updated TODO item

От
Bruce Momjian
Дата:
Thomas Swan wrote:
> Bruce Momjian wrote:
> 
> >TODO:  I have added a syntax suggested by someone on IRC:
> >
> >* Make it easier to create a database owned by someone who can't createdb,
> >  perhaps CREATE DATABASE dbname WITH USER = "user"
> >  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> >
> Perhaps  "CREATE DATABASE dbname WITH USER username" would fit a little 
> better.   I'd love to see this one get done... ;-)

Well, I had the equals sign because the documentation for other params
suggests it:
CREATE DATABASE name    [ WITH [ LOCATION = 'dbpath' ]           [ TEMPLATE = template ]           [ ENCODING =
encoding] ]
 

Maybe we should make the equals optional for all these options.

--  Bruce Momjian                        |  http://candle.pha.pa.us pgman@candle.pha.pa.us               |  (610)
853-3000+  If your life is a hard drive,     |  830 Blythe Avenue +  Christ can be your backup.        |  Drexel Hill,
Pennsylvania19026
 


Re: Updated TODO item

От
Thomas Swan
Дата:
Bruce Momjian wrote:<br /><blockquote cite="mid:200201031721.g03HLBK16195@candle.pha.pa.us" type="cite"><pre
wrap="">ThomasSwan wrote:<br /></pre><blockquote type="cite"><pre wrap="">Bruce Momjian wrote:<br /><br
/></pre><blockquotetype="cite"><pre wrap="">TODO:  I have added a syntax suggested by someone on IRC:<br /><br />* Make
iteasier to create a database owned by someone who can't createdb,<br /> perhaps CREATE DATABASE dbname WITH USER =
"user"<br/> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^</pre></blockquote><pre wrap="">Perhaps  "CREATE DATABASE
dbnameWITH USER username" would fit a little <br />better.   I'd love to see this one get done... ;-)<br
/></pre></blockquote><prewrap="">Well, I had the equals sign because the documentation for other params<br />suggests
it:<br/><br />    CREATE DATABASE name<br />        [ WITH [ LOCATION = 'dbpath' ]<br />               [ TEMPLATE =
template]<br />               [ ENCODING = encoding ] ]<br /><br />Maybe we should make the equals optional for all
theseoptions.</pre></blockquote> They need to be consistent.   I had forgotten that the existing syntax contained the
"="character.  Either way would be fine, but the "user = " option would definitely be a welcome addition.   I<br /><br
/><br/> 

Re: Updated TODO item

От
Bruce Momjian
Дата:
Thomas Swan wrote:
> Bruce Momjian wrote:
> 
> >TODO:  I have added a syntax suggested by someone on IRC:
> >
> >* Make it easier to create a database owned by someone who can't createdb,
> >  perhaps CREATE DATABASE dbname WITH USER = "user"
> >  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> >
> Perhaps  "CREATE DATABASE dbname WITH USER username" would fit a little 
> better.   I'd love to see this one get done... ;-)

OK, I checked at CREATE DATABASE is the only command that has the equals
in WITH PARAM = VAL.  Added to TODO:
* Make equals sign optional in CREATE DATABASE WITH param = 'val'

--  Bruce Momjian                        |  http://candle.pha.pa.us pgman@candle.pha.pa.us               |  (610)
853-3000+  If your life is a hard drive,     |  830 Blythe Avenue +  Christ can be your backup.        |  Drexel Hill,
Pennsylvania19026
 


Re: Updated TODO item

От
Gavin Sherry
Дата:
On Thu, 3 Jan 2002, Bruce Momjian wrote:

> > Perhaps  "CREATE DATABASE dbname WITH USER username" would fit a little 
> > better.   I'd love to see this one get done... ;-)
> 
> Well, I had the equals sign because the documentation for other params
> suggests it:
> 
>     CREATE DATABASE name
>         [ WITH [ LOCATION = 'dbpath' ]
>                [ TEMPLATE = template ]
>                [ ENCODING = encoding ] ]
> 
> Maybe we should make the equals optional for all these options.
> 

'WITH LOCATION dbpath', etc makes more sense. I'd be happy to revise my
patch to change this. Does anyone have any strong feelings against this?

Gavin



Re: Updated TODO item

От
Gavin Sherry
Дата:
On Thu, 3 Jan 2002, Bruce Momjian wrote:

> Thomas Swan wrote:
> > Bruce Momjian wrote:
> >
> > >TODO:  I have added a syntax suggested by someone on IRC:
> > >
> > >* Make it easier to create a database owned by someone who can't createdb,
> > >  perhaps CREATE DATABASE dbname WITH USER = "user"
> > >  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> > >
> > Perhaps  "CREATE DATABASE dbname WITH USER username" would fit a little
> > better.   I'd love to see this one get done... ;-)
>
> OK, I checked at CREATE DATABASE is the only command that has the equals
> in WITH PARAM = VAL.  Added to TODO:
>
>     * Make equals sign optional in CREATE DATABASE WITH param = 'val'

I've revised my previous patch to handle this.

Gavin

Re: Updated TODO item

От
Bruce Momjian
Дата:
Gavin Sherry wrote:
> On Thu, 3 Jan 2002, Bruce Momjian wrote:
>
> > Thomas Swan wrote:
> > > Bruce Momjian wrote:
> > >
> > > >TODO:  I have added a syntax suggested by someone on IRC:
> > > >
> > > >* Make it easier to create a database owned by someone who can't createdb,
> > > >  perhaps CREATE DATABASE dbname WITH USER = "user"
> > > >  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> > > >
> > > Perhaps  "CREATE DATABASE dbname WITH USER username" would fit a little
> > > better.   I'd love to see this one get done... ;-)
> >
> > OK, I checked at CREATE DATABASE is the only command that has the equals
> > in WITH PARAM = VAL.  Added to TODO:
> >
> >     * Make equals sign optional in CREATE DATABASE WITH param = 'val'
>
> I've revised my previous patch to handle this.
>

Thanks.  Saved for 7.3.

--
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026

Re: Updated TODO item

От
Kaare Rasmussen
Дата:
> * Make it easier to create a database owned by someone who can't createdb,
>   perhaps CREATE DATABASE dbname WITH USER = "user"
>   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Shouldn't that be

CREATE DATABASE dbname WITH OWNER = "user"

?

-- 
Kaare Rasmussen            --Linux, spil,--        Tlf:        3816 2582
Kaki Data                tshirts, merchandize      Fax:        3816 2501
Howitzvej 75               Åben 14.00-18.00        Web:      www.suse.dk
2000 Frederiksberg        Lørdag 11.00-17.00       Email: kar@kakidata.dk


Re: Updated TODO item

От
Bruce Momjian
Дата:
Kaare Rasmussen wrote:
> > * Make it easier to create a database owned by someone who can't createdb,
> >   perhaps CREATE DATABASE dbname WITH USER = "user"
> >   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> 
> Shouldn't that be
> 
> CREATE DATABASE dbname WITH OWNER = "user"
> 
> ?

Yes!  OWNER is much better.  TODO updated and I will save this message
for changes in 7.3:
http://candle.pha.pa.us/cgi-bin/pgpatches2

--  Bruce Momjian                        |  http://candle.pha.pa.us pgman@candle.pha.pa.us               |  (610)
853-3000+  If your life is a hard drive,     |  830 Blythe Avenue +  Christ can be your backup.        |  Drexel Hill,
Pennsylvania19026
 


Re: Updated TODO item

От
Bruce Momjian
Дата:
Doug McNaught wrote:
> Bruce Momjian <pgman@candle.pha.pa.us> writes:
> 
> > > Shouldn't that be
> > > 
> > > CREATE DATABASE dbname WITH OWNER = "user"
> > > 
> > > ?
> > 
> > Yes!  OWNER is much better.  TODO updated and I will save this message
> > for changes in 7.3:
> 
> Will this make OWNER into a new keyword, and break schemas that have
> "owner" as a table or column name?  USER is at least already a
> keyword...

We already use OWNER in ALTER TABLE so it is not really a new keyword:
       | ALTER TABLE relation_name OWNER TO UserId

Also, its usage is limited to CREATE TABLE so I believe a column named
owner is still possible, as it is now.

--  Bruce Momjian                        |  http://candle.pha.pa.us pgman@candle.pha.pa.us               |  (610)
853-3000+  If your life is a hard drive,     |  830 Blythe Avenue +  Christ can be your backup.        |  Drexel Hill,
Pennsylvania19026
 


Re: Updated TODO item

От
Doug McNaught
Дата:
Bruce Momjian <pgman@candle.pha.pa.us> writes:

> > Shouldn't that be
> > 
> > CREATE DATABASE dbname WITH OWNER = "user"
> > 
> > ?
> 
> Yes!  OWNER is much better.  TODO updated and I will save this message
> for changes in 7.3:

Will this make OWNER into a new keyword, and break schemas that have
"owner" as a table or column name?  USER is at least already a
keyword...

-Doug (not personally affected, but thought I'd raise it)
-- 
Let us cross over the river, and rest under the shade of the trees.  --T. J. Jackson, 1863


Re: Updated TODO item

От
Kaare Rasmussen
Дата:
> * Make it easier to create a database owned by someone who can't createdb,
>   perhaps CREATE DATABASE dbname WITH USER = "user"
>   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Shouldn't that be

CREATE DATABASE dbname WITH OWNER = "user"

?

-- 
Kaare Rasmussen            --Linux, spil,--        Tlf:        3816 2582
Kaki Data                tshirts, merchandize      Fax:        3816 2501
Howitzvej 75               Åben 14.00-18.00        Web:      www.suse.dk
2000 Frederiksberg        Lørdag 11.00-17.00       Email: kar@kakidata.dk


Re: Updated TODO item

От
Bruce Momjian
Дата:
Your patch has been added to the PostgreSQL unapplied patches list at:

    http://candle.pha.pa.us/cgi-bin/pgpatches

I will try to apply it within the next 48 hours.

---------------------------------------------------------------------------


Gavin Sherry wrote:
> On Thu, 3 Jan 2002, Bruce Momjian wrote:
>
> > Thomas Swan wrote:
> > > Bruce Momjian wrote:
> > >
> > > >TODO:  I have added a syntax suggested by someone on IRC:
> > > >
> > > >* Make it easier to create a database owned by someone who can't createdb,
> > > >  perhaps CREATE DATABASE dbname WITH USER = "user"
> > > >  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> > > >
> > > Perhaps  "CREATE DATABASE dbname WITH USER username" would fit a little
> > > better.   I'd love to see this one get done... ;-)
> >
> > OK, I checked at CREATE DATABASE is the only command that has the equals
> > in WITH PARAM = VAL.  Added to TODO:
> >
> >     * Make equals sign optional in CREATE DATABASE WITH param = 'val'
>
> I've revised my previous patch to handle this.
>
> Gavin

Content-Description:

[ Attachment, skipping... ]

--
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026

Re: Updated TODO item

От
Bruce Momjian
Дата:
Kaare Rasmussen wrote:
> > * Make it easier to create a database owned by someone who can't createdb,
> >   perhaps CREATE DATABASE dbname WITH USER = "user"
> >   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> 
> Shouldn't that be
> 
> CREATE DATABASE dbname WITH OWNER = "user"

Yes.  I will make that change.

--  Bruce Momjian                        |  http://candle.pha.pa.us pgman@candle.pha.pa.us               |  (610)
853-3000+  If your life is a hard drive,     |  830 Blythe Avenue +  Christ can be your backup.        |  Drexel Hill,
Pennsylvania19026