Search Postgresql Archives

Domains as typedefs: Performance and automatic casting

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I plan to define two domains with no contraints, sort of typedefs, to
work with date-times inside my application:

 CREATE DOMAIN instant AS timestamp(3) with time zone;
 CREATE DOMAIN localdatetime AS timestamp(3) without time zone;

Two questions:

1. I guess that there is no performance penalty in using such a DOMAIN
Am I right?

2. I see that PG does automatic (implicit casting)  between  TIMESTAMP
WITH/WITHOUT TIME ZONE types,
it accept one type in place of the other (a dangerous thing, IMO, as
the conversion is sensitive to the current
timezone) ; the same happens for these DOMAINs .
I guess that I must live with this, now way to disallow it... Am I right?

Hernán J. González

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux