Updated TODO item

Started by Bruce Momjianover 24 years ago38 messageshackers
Jump to latest
#1Bruce Momjian
bruce@momjian.us

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, Pennsylvania 19026
#2Thomas Swan
tswan-lst@ics.olemiss.edu
In reply to: Bruce Momjian (#1)
Re: Updated TODO item

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... ;-)

#3Gavin Sherry
swm@linuxworld.com.au
In reply to: Bruce Momjian (#1)
Re: [HACKERS] Updated TODO item

On Thu, 3 Jan 2002, 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"
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Attached is a patch which implements this. Passes regression:

======================
All 79 tests passed.
======================

This required the modification of the CreatedbStmt data structure. I've
ensured that all functions which interact with CreatedbStmt have been
modified.

Gavin

Attachments:

createdb_with_user.patch.gzapplication/x-gzip; name=createdb_with_user.patch.gzDownload
#4Bruce Momjian
bruce@momjian.us
In reply to: Thomas Swan (#2)
Re: Updated TODO item

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, Pennsylvania 19026
#5Bruce Momjian
bruce@momjian.us
In reply to: Gavin Sherry (#3)
Re: [HACKERS] Updated TODO item

Thanks. Saved for 7.3.

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

Gavin Sherry wrote:

On Thu, 3 Jan 2002, 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"
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Attached is a patch which implements this. Passes regression:

======================
All 79 tests passed.
======================

This required the modification of the CreatedbStmt data structure. I've
ensured that all functions which interact with CreatedbStmt have been
modified.

Gavin

Content-Description:

[ Attachment, skipping... ]

---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to majordomo@postgresql.org)

-- 
  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
#6Thomas Swan
tswan-lst@ics.olemiss.edu
In reply to: Bruce Momjian (#4)
Re: Updated TODO item

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title></title>
</head>
<body>
Bruce Momjian wrote:<br>
<blockquote type="cite" cite="mid:200201031721.g03HLBK16195@candle.pha.pa.us">
<pre wrap="">Thomas Swan wrote:<br></pre>
<blockquote type="cite">
<pre wrap="">Bruce Momjian wrote:<br><br></pre>
<blockquote type="cite">
<pre wrap="">TODO: I have added a syntax suggested by someone on IRC:<br><br>* Make it easier 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 dbname WITH USER username" would fit a little <br>better. I'd love to see this one get done... ;-)<br></pre>
</blockquote>
<pre wrap=""><!---->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 these options.</pre>
</blockquote>
They need to be consistent. &nbsp; I had forgotten that the existing syntax contained
the "=" character. &nbsp;Either way would be fine, but the "user = " option would
definitely be a welcome addition. &nbsp; I<br>
<br>
<br>
</body>
</html>

#7Bruce Momjian
bruce@momjian.us
In reply to: Thomas Swan (#2)
Re: Updated TODO item

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, Pennsylvania 19026
#8Gavin Sherry
swm@linuxworld.com.au
In reply to: Bruce Momjian (#4)
Re: Updated TODO item

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

#9Gavin Sherry
swm@linuxworld.com.au
In reply to: Bruce Momjian (#7)
Re: [HACKERS] Updated TODO item

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

Attachments:

createdb_with_user.patch2.gzapplication/x-gzip; name=createdb_with_user.patch2.gzDownload
#10Bruce Momjian
bruce@momjian.us
In reply to: Gavin Sherry (#9)
Re: [HACKERS] Updated TODO item

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
#11Kaare Rasmussen
kar@webline.dk
In reply to: Bruce Momjian (#1)
Re: Updated TODO item

* 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

#12Kaare Rasmussen
kar@kakidata.dk
In reply to: Kaare Rasmussen (#11)
Re: Updated TODO item

* 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

#13Bruce Momjian
bruce@momjian.us
In reply to: Kaare Rasmussen (#12)
Re: Updated TODO item

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, Pennsylvania 19026
#14Doug McNaught
doug@wireboard.com
In reply to: Bruce Momjian (#13)
Re: Updated TODO item

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

#15Bruce Momjian
bruce@momjian.us
In reply to: Doug McNaught (#14)
Re: Updated TODO item

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, Pennsylvania 19026
#16Gavin Sherry
swm@linuxworld.com.au
In reply to: Kaare Rasmussen (#12)
Re: [HACKERS] Updated TODO item

On Fri, 4 Jan 2002, 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"

?

A much better idea. There is no conflict in using OWNER here.

Revised patch attached.

Gavin

Attachments:

createdb_with_owner3.patch.gzapplication/x-gzip; name=createdb_with_owner3.patch.gzDownload
#17Bruce Momjian
bruce@momjian.us
In reply to: Gavin Sherry (#16)
Re: [HACKERS] Updated TODO item

Saved for 7.3.

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

Gavin Sherry wrote:

On Fri, 4 Jan 2002, 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"

?

A much better idea. There is no conflict in using OWNER here.

Revised patch attached.

Gavin

Content-Description:

[ Attachment, skipping... ]

---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@postgresql.org so that your
message can get through to the mailing list cleanly

-- 
  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
#18Thomas Lockhart
lockhart@fourpalms.org
In reply to: Gavin Sherry (#16)
Re: [HACKERS] Updated TODO item

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

CREATE DATABASE dbname WITH OWNER = "user"

A much better idea. There is no conflict in using OWNER here.

Does this have the multiple "WITH xxx" clauses which were discussed
earlier? That is a nonstarter for syntax. There are other places in the
grammar having "with clauses" and multiple arguments or subclauses, and
having the shift/reduce issues resolved...

- Thomas

#19Christopher Kings-Lynne
chriskl@familyhealth.com.au
In reply to: Thomas Lockhart (#18)
Re: [HACKERS] Updated TODO item

Does this have the multiple "WITH xxx" clauses which were discussed
earlier? That is a nonstarter for syntax. There are other places in the
grammar having "with clauses" and multiple arguments or subclauses, and
having the shift/reduce issues resolved...

I might be thicker than a whale sandwich (10 points if you can pick the
quote :) ), but can someone please tell me what a shift/reduce issue is,
exactly...

Thanks,

Chris

#20Bruce Momjian
bruce@momjian.us
In reply to: Thomas Lockhart (#18)
Re: [HACKERS] Updated TODO item

Thomas Lockhart wrote:

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

CREATE DATABASE dbname WITH OWNER = "user"

A much better idea. There is no conflict in using OWNER here.

Does this have the multiple "WITH xxx" clauses which were discussed
earlier? That is a nonstarter for syntax. There are other places in the
grammar having "with clauses" and multiple arguments or subclauses, and
having the shift/reduce issues resolved...

Not sure. Patch is at:

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

Are you asking if it has "WITH ARG val, ARG val" or "WITH ARG val WITH
ARG 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, Pennsylvania 19026
#21Thomas Lockhart
lockhart@fourpalms.org
In reply to: Christopher Kings-Lynne (#19)
#22Gavin Sherry
swm@linuxworld.com.au
In reply to: Thomas Lockhart (#18)
#23Gavin Sherry
swm@linuxworld.com.au
In reply to: Christopher Kings-Lynne (#19)
#24Thomas Lockhart
lockhart@fourpalms.org
In reply to: Gavin Sherry (#23)
#25Gavin Sherry
swm@linuxworld.com.au
In reply to: Thomas Lockhart (#24)
#26Bruce Momjian
bruce@momjian.us
In reply to: Gavin Sherry (#9)
#27Bruce Momjian
bruce@momjian.us
In reply to: Kaare Rasmussen (#12)
#28Tom Lane
tgl@sss.pgh.pa.us
In reply to: Gavin Sherry (#16)
#29Fernando Nasser
fnasser@redhat.com
In reply to: Gavin Sherry (#16)
#30Tom Lane
tgl@sss.pgh.pa.us
In reply to: Fernando Nasser (#29)
#31Bruce Momjian
bruce@momjian.us
In reply to: Tom Lane (#28)
#32Bruce Momjian
bruce@momjian.us
In reply to: Bruce Momjian (#31)
#33Tom Lane
tgl@sss.pgh.pa.us
In reply to: Bruce Momjian (#32)
#34Peter Eisentraut
peter_e@gmx.net
In reply to: Bruce Momjian (#32)
#35Bruce Momjian
bruce@momjian.us
In reply to: Tom Lane (#33)
#36Neil Conway
neilc@samurai.com
In reply to: Bruce Momjian (#35)
#37Tom Lane
tgl@sss.pgh.pa.us
In reply to: Neil Conway (#36)
#38Fernando Nasser
fnasser@redhat.com
In reply to: Gavin Sherry (#16)