Re: Fresh eyeballs needed: input into error

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Rich Shepard <rshepard(at)appl-ecosys(dot)com>
Cc: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: Fresh eyeballs needed: input into error
Date: 2022-04-26 22:02:18
Message-ID: 273240.1651010538@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Rich Shepard <rshepard(at)appl-ecosys(dot)com> writes:
> I'm getting a syntax error with an input into statement and I cannot see the
> cause.

> A MWE and the result (N.B.: line one wrapped for readability; it ends with
> 'values'):
> insert into people (person_nbr,lname,fname,job_title,company_nbr,loc_nbr,
> loc_phone_ext,direct_phone,direct_fax,cell_phone,email,active,comment) values
> (6000,'No','Name',null,404,1,null,null,null,null,null,null,null);

> 2: ERROR: syntax error at end of input
> LINE 2: (
> ^
> What do I keep missing?

Copying-and-pasting from your mail gets me

ERROR: relation "people" does not exist
LINE 1: insert into people (person_nbr,lname,fname,job_title,company...
^

so there's nothing wrong with the syntax as-presented. I agree with
Adrian's guess about invisible characters in your input file;
perhaps a control-D or ASCII NUL would produce that symptom.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2022-04-26 22:03:38 Re: Fresh eyeballs needed: input into error
Previous Message David G. Johnston 2022-04-26 21:59:50 Re: Fresh eyeballs needed: input into error