On Tue, 2024-04-02 at 11:08 +0530, sud wrote:
> Not able to figure out why it's giving below error during timezone conversion
> while defining the partitions even though I used the typecast?
>
> [...]
> DECLARE
> start_date TIMESTAMP := '2022-01-01';
> [...]
> TO_CHAR(start_date + i, 'YYYY_MM_DD')
>
> ***********
> SQL Error [42883]: ERROR: operator does not exist: timestamp without time zone + integer
> Hint: No operator matches the given name and argument types. You might need to add explicit type casts.
As the error states, you cannot add an integer to a timestamp.
What is the supposed meaning of that addition?
Yours,
Laurenz Albe