Re: [GENERAL] 9.6.1: INSERT with PK as serial - Mailing list pgsql-general

From Rich Shepard
Subject Re: [GENERAL] 9.6.1: INSERT with PK as serial
Date
Msg-id alpine.LNX.2.11.1701161603160.18553@localhost
Whole thread Raw
In response to Re: [GENERAL] 9.6.1: INSERT with PK as serial  (David Rowley <david.rowley@2ndquadrant.com>)
Responses Re: [GENERAL] 9.6.1: INSERT with PK as serial  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
On Tue, 17 Jan 2017, David Rowley wrote:

> You may have more luck getting an answer if you include the statement
> causing the problem.

David,

   Here's an example:

INSERT INTO companies VALUES
   (1,'AG Spray Inc.',,'PO Box
12129','Salem','OR','97309-0129','USA','503-371-7907','888-273-0937','info@agsprayinc.com',,'Chemicals','Opportunity'),

and the associated error message:

psql:companies.sql:1: ERROR:  syntax error at or near "Spray"
LINE 1: INSERT INTO companies VALUES (AG Spray Inc.,,PO Box 12129,Sa...

> If you're not specifying the column names, then the VALUES list must
> have the same number of values, in the same order as the columns
> defined on the table.

   As I wrote in the original message, I did this.

Rich


pgsql-general by date:

Previous
From: David Rowley
Date:
Subject: Re: [GENERAL] 9.6.1: INSERT with PK as serial
Next
From: Tom Lane
Date:
Subject: Re: [GENERAL] 9.6.1: INSERT with PK as serial