Re: polite request about syntax

Поиск
Список
Период
Сортировка
От Jim Nasby
Тема Re: polite request about syntax
Дата
Msg-id E08E7177-9DC5-425F-9CCD-71F25A4FEE5E@enterprisedb.com
обсуждение исходный текст
Ответ на Re: polite request about syntax  (Jeremy Drake <pgsql@jdrake.com>)
Список 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 по дате отправления:

Предыдущее
От: Jim Nasby
Дата:
Сообщение: Re: New version of money type
Следующее
От: Jim Nasby
Дата:
Сообщение: Re: Mid cycle release?