Re: Timestamp conversion Error in dynamic sql script - Mailing list pgsql-general

From Greg Sabino Mullane
Subject Re: Timestamp conversion Error in dynamic sql script
Date
Msg-id CAKAnmmJXnjoEJRxRd7az0pSZX6UDMeNG=5ZUgZmKgha2VVdmUw@mail.gmail.com
Whole thread Raw
In response to Re: Timestamp conversion Error in dynamic sql script  (Erik Wienhold <ewie@ewie.name>)
Responses Re: Timestamp conversion Error in dynamic sql script
List pgsql-general
1. Declare start_date as DATE when you want to add days with date + int
2. Keep TIMESTAMP and use start_date + make_interval(days => i)

Also

0. Use TIMESTAMPTZ not TIMESTAMP

Cheers,
Greg

pgsql-general by date:

Previous
From: Erik Wienhold
Date:
Subject: Re: Timestamp conversion Error in dynamic sql script
Next
From: Adrian Klaver
Date:
Subject: Re: Getting wrong datetime in database using insert into table query.