You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Greg Stein <gs...@gmail.com> on 2010/09/23 17:44:22 UTC

casing of SQL statements? (was: svn commit: r1000370...)

On Thu, Sep 23, 2010 at 13:41, Philip Martin <ph...@wandisco.com> wrote:
> Greg Stein <gs...@gmail.com> writes:
>
>> On Thu, Sep 23, 2010 at 05:16,  <ph...@apache.org> wrote:
>>> Author: philip
>>> Date: Thu Sep 23 09:16:28 2010
>>> New Revision: 1000370
>>>
>>> URL: http://svn.apache.org/viewvc?rev=1000370&view=rev
>>> Log:
>>> Use lower case in SQL queries instead of mixing upper and lower
>>> cases inconsistently.  No functional change.
>>
>> I preferred the form with uppercase keywords and table names. It makes
>> it much easier to see which columns are selected, and to read the
>> expressions in WHERE clauses.
>>
>> IOW, I disagree with this change and would actually prefer fixing the
>> all-lowercase queries that were scattered around.
>
> I don't mind whether we use upper case or lower case, I just want all
> keywords in the same case, all table names in the same case and all
> column names in the same case (and those 3 categories don't have to be
> the same).  I chose lower case simply because there appeared to be
> more lower case than uppercase.  I'm prepared to make the change to
> upper case if that is what people want.  Or you can do it :)

I'm fine with doing the work. Let's gather a few preferences, and if
they support a change from all-lower-case, then I'll make it happen.

People?


Cheers,
-g

Re: casing of SQL statements?

Posted by Greg Stein <gs...@gmail.com>.
On Thu, Sep 23, 2010 at 14:01, C. Michael Pilato <cm...@collab.net> wrote:
> On 09/23/2010 01:54 PM, Hyrum K. Wright wrote:
>> On Thu, Sep 23, 2010 at 12:44 PM, Greg Stein <gs...@gmail.com> wrote:
>>> I'm fine with doing the work. Let's gather a few preferences, and if
>>> they support a change from all-lower-case, then I'll make it happen.
>>>
>>> People?
>>
>> Even though it can be a bit unwieldy to type, I prefer the uppercased
>> keywords.  Don't care so much about the table names, though it would
>> make sense to make them lowercased, since they are identifiers, and
>> not keywords.
>
> I've always preferred the all-caps keywords, but honestly that's because my
> SQL knowledge is weak and the extra formatting hints help me know what's
> what.  I don't suppose that's as much of an issue for folks who do SQL stuff
> on a routine basis.

I first used SQL over 20 years ago and still prefer the upper case
keywords. You're not alone :-P

Fixed in r1000691.

Cheers,
-g

Re: casing of SQL statements?

Posted by Blair Zajac <bl...@orcaware.com>.
On 09/23/2010 11:01 AM, C. Michael Pilato wrote:
> On 09/23/2010 01:54 PM, Hyrum K. Wright wrote:
>> On Thu, Sep 23, 2010 at 12:44 PM, Greg Stein<gs...@gmail.com>  wrote:
>>> I'm fine with doing the work. Let's gather a few preferences, and if
>>> they support a change from all-lower-case, then I'll make it happen.
>>>
>>> People?
>>
>> Even though it can be a bit unwieldy to type, I prefer the uppercased
>> keywords.  Don't care so much about the table names, though it would
>> make sense to make them lowercased, since they are identifiers, and
>> not keywords.
>
> I've always preferred the all-caps keywords, but honestly that's because my
> SQL knowledge is weak and the extra formatting hints help me know what's
> what.  I don't suppose that's as much of an issue for folks who do SQL stuff
> on a routine basis.

I prefer all caps keywords and lowercase table and column names.

Blair

Re: casing of SQL statements?

Posted by "C. Michael Pilato" <cm...@collab.net>.
On 09/23/2010 01:54 PM, Hyrum K. Wright wrote:
> On Thu, Sep 23, 2010 at 12:44 PM, Greg Stein <gs...@gmail.com> wrote:
>> I'm fine with doing the work. Let's gather a few preferences, and if
>> they support a change from all-lower-case, then I'll make it happen.
>>
>> People?
> 
> Even though it can be a bit unwieldy to type, I prefer the uppercased
> keywords.  Don't care so much about the table names, though it would
> make sense to make them lowercased, since they are identifiers, and
> not keywords.

I've always preferred the all-caps keywords, but honestly that's because my
SQL knowledge is weak and the extra formatting hints help me know what's
what.  I don't suppose that's as much of an issue for folks who do SQL stuff
on a routine basis.

-- 
C. Michael Pilato <cm...@collab.net>
CollabNet   <>   www.collab.net   <>   Distributed Development On Demand

Re: casing of SQL statements? (was: svn commit: r1000370...)

Posted by "Hyrum K. Wright" <hy...@mail.utexas.edu>.
On Thu, Sep 23, 2010 at 12:44 PM, Greg Stein <gs...@gmail.com> wrote:
> On Thu, Sep 23, 2010 at 13:41, Philip Martin <ph...@wandisco.com> wrote:
>> Greg Stein <gs...@gmail.com> writes:
>>
>>> On Thu, Sep 23, 2010 at 05:16,  <ph...@apache.org> wrote:
>>>> Author: philip
>>>> Date: Thu Sep 23 09:16:28 2010
>>>> New Revision: 1000370
>>>>
>>>> URL: http://svn.apache.org/viewvc?rev=1000370&view=rev
>>>> Log:
>>>> Use lower case in SQL queries instead of mixing upper and lower
>>>> cases inconsistently.  No functional change.
>>>
>>> I preferred the form with uppercase keywords and table names. It makes
>>> it much easier to see which columns are selected, and to read the
>>> expressions in WHERE clauses.
>>>
>>> IOW, I disagree with this change and would actually prefer fixing the
>>> all-lowercase queries that were scattered around.
>>
>> I don't mind whether we use upper case or lower case, I just want all
>> keywords in the same case, all table names in the same case and all
>> column names in the same case (and those 3 categories don't have to be
>> the same).  I chose lower case simply because there appeared to be
>> more lower case than uppercase.  I'm prepared to make the change to
>> upper case if that is what people want.  Or you can do it :)
>
> I'm fine with doing the work. Let's gather a few preferences, and if
> they support a change from all-lower-case, then I'll make it happen.
>
> People?

Even though it can be a bit unwieldy to type, I prefer the uppercased
keywords.  Don't care so much about the table names, though it would
make sense to make them lowercased, since they are identifiers, and
not keywords.

-Hyrum

Re: casing of SQL statements? (was: svn commit: r1000370...)

Posted by Greg Stein <gs...@gmail.com>.
On Thu, Sep 23, 2010 at 14:36, Peter Samuelson <pe...@p12n.org> wrote:
>
> [Greg Stein]
>> I'm fine with doing the work. Let's gather a few preferences, and if
>> they support a change from all-lower-case, then I'll make it happen.
>
> Yay, bikeshed!  I always do SQL keywords (including NULL) and builtin
> functions (COUNT, MAX) in all caps; tables, views, columns, stored
> procedures in all-lower.
>
> Peter, who has done exactly no wc-ng work at all

As a full committer (PMC Member) the whole projects is yours and your
responsibility. Doesn't matter whether you worked on it or not, your
opinion still matters :-)


... and with that said, it looks like we have a general consensus
around: keywords/bultins as upper-case, and tables/columns as
lower-case. I'll make it happen.

Thanks,
-g

Re: casing of SQL statements? (was: svn commit: r1000370...)

Posted by Peter Samuelson <pe...@p12n.org>.
[Greg Stein]
> I'm fine with doing the work. Let's gather a few preferences, and if
> they support a change from all-lower-case, then I'll make it happen.

Yay, bikeshed!  I always do SQL keywords (including NULL) and builtin
functions (COUNT, MAX) in all caps; tables, views, columns, stored
procedures in all-lower.

Peter, who has done exactly no wc-ng work at all