From: Rob Sargent <robjsargent@gmail.com>
To: Sherman Willden <operasopranos@gmail.com>
Cc: pgsql-general@postgresql.org <pgsql-general@postgresql.org>
Subject: Re: Insert results in 0 1
Date: Mon, 15 Jan 2018 19:13:28 -0700
Message-ID: <D085675C-E993-4BDD-BDD4-5AC815A4B298@gmail.com> (raw)
In-Reply-To: <CAGv-wXGh8kN-V+3yyJkSJzWhy_mEjpJWNTk73h0XMaefBcC2Vg@mail.gmail.com>
References: <CAGv-wXGh8kN-V+3yyJkSJzWhy_mEjpJWNTk73h0XMaefBcC2Vg@mail.gmail.com>
> On Jan 15, 2018, at 5:57 PM, Sherman Willden <operasopranos@gmail.com> wrote:
>
> Computer HP Compaq 6710b
> Development Platform: Ubuntu 17.10 mainly command line work
> Tools: perl 5.26 and postgresql 9.6
>
> Why do I get a 0 1 when using insert?
>
> Thanks;
>
> Sherman
> classical=# INSERT INTO string_groups VALUES('et_b_02', 'Sonata in B minor', 'Eroica Trio', 'Jean Baptiste Loeillet', 'Baroque');
> INSERT 0 1
> classical=# INSERT INTO string_groups VALUES('et_b_02', 'Sonata in B minor', 'Eroica Trio', 'Jean Baptiste Loeillet', 'Baroque');
> ERROR: duplicate key value violates unique constraint "string_groups_pkey"
> DETAIL: Key (id)=(et_b_02) already exists.
>
On successful completion, an INSERT command returns a command tag of the form
INSERT oid count
The count is the number of rows inserted or updated. If count is exactly one, and the target table has OIDs, then oid is the OID assigned to the inserted row. The single row must have been inserted rather than updated. Otherwise oid is zero.
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: robjsargent@gmail.com, operasopranos@gmail.com
Subject: Re: Insert results in 0 1
In-Reply-To: <D085675C-E993-4BDD-BDD4-5AC815A4B298@gmail.com>
References: <CAGv-wXGh8kN-V+3yyJkSJzWhy_mEjpJWNTk73h0XMaefBcC2Vg@mail.gmail.com> <D085675C-E993-4BDD-BDD4-5AC815A4B298@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 DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox