Re: PostgreSQL Gotchas - Mailing list pgsql-general

From Martijn van Oosterhout
Subject Re: PostgreSQL Gotchas
Date
Msg-id 20051013202725.GF6080@svana.org
Whole thread Raw
In response to Re: PostgreSQL Gotchas  (Chris Travers <chris@travelamericas.com>)
Responses Re: PostgreSQL Gotchas  (Chris Travers <chris@travelamericas.com>)
List pgsql-general
On Thu, Oct 13, 2005 at 12:21:14PM -0700, Chris Travers wrote:
> >Since the end reward for all this work would be having to read CATALOGS
> >WRITTEN IN ALL UPPER CASE, none of the key developers seem very
> >interested ...
> >
> >
> Why would this be required?  If an individual developer wants to have a
> db with folding to uppercase, that developer can easily quote any
> references to system tables himself.  I don't see why this is a
> requirement.  "Case sensitivity" is "Case sensitivity" is "Case
> sensitivity" ...

I think you're slightly missing the point. Most people won't need to
change any queries because unquoted identifiers are case-folded anyway.
Which way doesn't matter, as long as it's consistant. No the main
objection would be this (see below). Does anyone really want this? I'll
take lowercase anyday... (Note, it's not exact, some things aren't SQL
identifiers so would be left alone. But idea is the same.)

TEST=# \l
        List of databases
   Name    |  Owner   | Encoding
-----------+----------+----------
 TEMPLATE0 | POSTGRES | UNICODE
 TEMPLATE1 | POSTGRES | UNICODE
<snip>
(6 rows)

TEST=# \df+ bit
                                                        List of functions
 Result data type |   Schema   | Name |  Argument data types  |  Owner   | Language | Source code |
Description

------------------+------------+------+-----------------------+----------+----------+-------------+------------------------------
 BIT              | PG_CATALOG | BIT  | BIGINT                | POSTGRES | INTERNAL | BITFROMINT8 | INT8 To BITSTRING
 BIT              | PG_CATALOG | BIT  | BIT, INTEGER, BOOLEAN | POSTGRES | INTERNAL | BIT         | Adjust BIT() to
typomodlength 
 BIT              | PG_CATALOG | BIT  | INTEGER               | POSTGRES | INTERNAL | BITFROMINT4 | INT4 To BITSTRING

(3 rows)

TEST=# \d website
     Table "PUBLIC.WEBSITE"
  Column   |  Type   | Modifiers
-----------+---------+-----------
 FILENAME  | TEXT    |
 TITLE     | TEXT    |
 PARENT    | TEXT    |
 HITS      | INTEGER |
 HIDDEN    | BOOLEAN |
 HITSMONTH | INTEGER |
Indexes:
    "WEBSITE_FILENAME" UNIQUE, BTREE (FILENAME)


--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a
> tool for doing 5% of the work and then sitting around waiting for someone
> else to do the other 95% so you can sue them.

Attachment

pgsql-general by date:

Previous
From: "Rafael Montoya"
Date:
Subject: Windows Installation error
Next
From: Tino Wildenhain
Date:
Subject: quoting was: Re: PostgreSQL 8.1 vs. MySQL 5.0?