Re: polite request about syntax - Mailing list pgsql-hackers

From Jim Nasby
Subject Re: polite request about syntax
Date
Msg-id E08E7177-9DC5-425F-9CCD-71F25A4FEE5E@enterprisedb.com
Whole thread Raw
In response to Re: polite request about syntax  (Jeremy Drake <pgsql@jdrake.com>)
List pgsql-hackers
On Sep 15, 2006, at 11:32 PM, Jeremy Drake wrote:
> When I was first dealing with postgres, I found it extremely  
> annoying that
> I had to type out "double precision" rather than just "double"  
> since every
> sane programming language (as well as Java) uses double.  I eventually
> figured out that it was because double precision is the standard  
> name, but
> I don't like to type and although I know I could use float8, I am  
> used to
> typing double.
>
> I have found the same thing with the type "timestamp without time  
> zone".
> The verbosity of type names seems rather extreme.  But it is just not
> important enough to warrant me creating a domain or anything to do
> anything about it, it just slightly irks me every time I have to type
> them.

Luckily, it's pretty easy to create a 'double' type on your own,  
either as a DOMAIN or as it's own type. Same with datetime, etc.  
(BTW, timestamptz works great as a replacement for "timestamp with  
time zone").

Going one step further, you could also create a compatibility package  
and put it on pgFoundry. In fact, I believe one already exists for  
MySQL. I'm sure users would love to see ones for other popular  
databases.

As for $$ quoting, I do think it would be nice if the docs adopted  
the standard of

CREATE FUNCTION my_function ... $my_function$
...
$my_function$

While more verbose than $$, it does a lot to help code readability.
--
Jim Nasby                                            jim@nasby.net
EnterpriseDB      http://enterprisedb.com      512.569.9461 (cell)




pgsql-hackers by date:

Previous
From: Jim Nasby
Date:
Subject: Re: New version of money type
Next
From: Jim Nasby
Date:
Subject: Re: Mid cycle release?