Re: COPY and custom datestyles. Or some other technique?

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: Ron <ronljohnsonjr(at)gmail(dot)com>
Cc: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: COPY and custom datestyles. Or some other technique?
Date: 2023-03-30 02:06:12
Message-ID: CAKFQuwbXWkWOZFTe1wDiQu21uH+_rp=BqHmBhBN35+o7L+VDDA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wed, Mar 29, 2023 at 6:51 PM Ron <ronljohnsonjr(at)gmail(dot)com> wrote:

> It would be really helpful to be able to reposition columns in tables.
> That
> way, one could:
> add the new TIMESTAMP column,
> populate it using to_timestamp(),
> drop the text column,
> reposition the TIMESTAMP column to where it "should" be.
>
>
If that would give you what you need then just define the column as text
initially, load the data, then do an ALTER COLUMN ... ALTER TYPE to change
the column type to timestamptz in place, with the conversion done via USING.

David J.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Ron 2023-03-30 02:38:53 Re: COPY and custom datestyles. Or some other technique?
Previous Message 任重 2023-03-30 01:58:07 Get dead tuples data