Re: polite request about syntax

From: Jim Nasby <jimn(at)enterprisedb(dot)com>
To: Jeremy Drake <pgsql(at)jdrake(dot)com>
Cc: Dave Page <dpage(at)vale-housing(dot)co(dot)uk>, Ricardo Malafaia <rmalafaia(at)gmail(dot)com>, Andrew Dunstan <andrew(at)dunslane(dot)net>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: polite request about syntax
Date: 2006-09-18 01:35:12
Message-ID: E08E7177-9DC5-425F-9CCD-71F25A4FEE5E@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)nasby(dot)net
EnterpriseDB http://enterprisedb.com 512.569.9461 (cell)

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew - Supernews 2006-09-18 02:00:46 Re: 8.2 beta blockers
Previous Message Jonah H. Harris 2006-09-18 01:29:29 Re: One of our own begins a new life