public inbox for [email protected]  
help / color / mirror / Atom feed
From: Greg Sabino Mullane <[email protected]>
To: Erik Wienhold <[email protected]>
Cc: sud <[email protected]>
Cc: pgsql-general <[email protected]>
Subject: Re: Timestamp conversion Error in dynamic sql script
Date: Tue, 2 Apr 2024 10:16:04 -0400
Message-ID: <CAKAnmmJXnjoEJRxRd7az0pSZX6UDMeNG=5ZUgZmKgha2VVdmUw@mail.gmail.com> (raw)
In-Reply-To: <m5bfxgtwkn6vasomhh3h36frkehjapftu74ebxattsyajxgq4w@uhxjzqsnqzyu>
References: <CAD=mzVVHrGgJ08SH8pECjTAH1EKE26ZdL26OjW3mcXhM-AZi2A@mail.gmail.com>
	<m5bfxgtwkn6vasomhh3h36frkehjapftu74ebxattsyajxgq4w@uhxjzqsnqzyu>

>
> 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


reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected], [email protected]
  Subject: Re: Timestamp conversion Error in dynamic sql script
  In-Reply-To: <CAKAnmmJXnjoEJRxRd7az0pSZX6UDMeNG=5ZUgZmKgha2VVdmUw@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox