Re: Comparing epoch to timestamp

From: Alexander Farber <alexander(dot)farber(at)gmail(dot)com>
To: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: Comparing epoch to timestamp
Date: 2017-10-30 14:21:11
Message-ID: CAADeyWgEUmTv1JAhMk3Gs5Y_HNOFqX7o1ue=EXvPdg8umHPUEw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

# EXPLAIN SELECT ARRAY_AGG(hashed)

FROM words_nouns

WHERE added > to_timestamp(0)

UNION

SELECT ARRAY_AGG(hashed)

FROM words_verbs

WHERE added > to_timestamp(0)

;
QUERY PLAN

------------------------------------------------------------------------------------------------
Unique (cost=2361.99..2362.00 rows=2 width=32)
-> Sort (cost=2361.99..2361.99 rows=2 width=32)
Sort Key: (array_agg(words_nouns.hashed))
-> Append (cost=1517.06..2361.98 rows=2 width=32)
-> Aggregate (cost=1517.06..1517.07 rows=1 width=32)
-> Seq Scan on words_nouns (cost=0.00..1517.05
rows=1 width=32)
Filter: (added > '1970-01-01
01:00:00+01'::timestamp with time zone)
-> Aggregate (cost=844.88..844.89 rows=1 width=32)
-> Seq Scan on words_verbs (cost=0.00..844.88 rows=1
width=32)
Filter: (added > '1970-01-01
01:00:00+01'::timestamp with time zone)
(10 rows)

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2017-10-30 14:35:36 Re: gin index trouble
Previous Message David G. Johnston 2017-10-30 14:08:07 Re: starting PG command line options vs postgresql.con