On Wed, Apr 06, 2011 at 11:15:31AM -0400, Jerry Sievers wrote:

> I'd suggest not storing age but instead wrapping with a view that calls
> date_trunc('year', now() - dob).

Or put that in the query:

SELECT
        ...,
        date_trunc('year', now() - dob) as age
FROM
        users
;

Karsten
-- 
GPG key ID E4071346 @ gpg-keyserver.de
E167 67FD A291 2BEA 73BD  4537 78B9 A9F9 E407 1346

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

Reply via email to