From: | Steve Wampler <swampler(at)nso(dot)edu> |
---|---|
To: | Postgres-General <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Odd messages on reloading DB table |
Date: | 2019-02-07 16:38:54 |
Message-ID: | 1ee763b7-b6be-8561-f17c-7a384649072b@nso.edu |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On 2/7/19 9:28 AM, Steve Wampler wrote:
> With PostgreSQL 9.5.15, I ran:
>
> pg_dump -t targets -d atst.experimentdb >nT.db
>
> then I ran:
>
> psql -h langley atst.experimentdb <nT.db
>
> and got:
...
> ERROR: relation "targets" already exists
> ALTER TABLE
> ERROR: relation "targets" does not exist
> LINE 1: UPDATE targets SET time_stamp=new.time_stamp, ...
> ^
> QUERY: UPDATE targets SET time_stamp=new.time_stamp, modified=new.modified,
> id=new.id, targets=new.targets WHERE (id=new.id)
> CONTEXT: PL/pgSQL function public.targets_insert_or_update() line 1 at SQL statement
> COPY targets, line 1: "2017-10-31 09:37:28.798152 t az_el_target
> {"name":"AZ_EL_Targets","priority":10,"tags":["{\\"Tag.tag..."
> ERROR: relation "id_id_targets" already exists
> ERROR: relation "time_stamp_id_targets" already exists
> ERROR: trigger "targets_trigger_insert" for relation "targets" already exists
> ERROR: trigger "targets_trigger_update" for relation "targets" already exists
> REVOKE
> REVOKE
> GRANT
> GRANT
>
> Eh? It looks like it worked (maybe), but why:
>
> (1) the table already exist and the immediately doesn't exist?
> (2) report ERROR on UPDATE when there are no UPDATES in the input file?
I take it back. The content of the table was not restored to the values in nT.db afterall.
--
Steve Wampler -- swampler(at)nso(dot)edu
The gods that smiled on your birth are now laughing out loud.
From | Date | Subject | |
---|---|---|---|
Next Message | Michel Pelletier | 2019-02-07 17:16:49 | Re: How to add a new psql command ? |
Previous Message | Steve Wampler | 2019-02-07 16:28:59 | Odd messages on reloading DB table |