Updated TODO item
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
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... ;-)
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:
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
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
<!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. 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>
</body>
</html>
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
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
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:
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
* 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
* 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
Import Notes
Resolved by subject fallback
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
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
Import Notes
Reply to msg id not found: BruceMomjiansmessageofFri4Jan2002134341-0500EST
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
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:
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
* 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
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
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