pg.ddx.io pgsql-general@postgresql.org mailing list archive
help / color / mirror / Atom feedFresh eyeballs needed: input into error
14+ messages / 6 participants
[nested] [flat]
* Fresh eyeballs needed: input into error
@ 2022-04-26 21:31 Rich Shepard <rshepard@appl-ecosys.com>
0 siblings, 3 replies; 14+ messages in thread
From: Rich Shepard @ 2022-04-26 21:31 UTC (permalink / raw)
To: pgsql-general@lists.postgresql.org
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?
TIA,
Rich
^ permalink raw reply [nested|flat] 14+ messages in thread
* Re: Fresh eyeballs needed: input into error
@ 2022-04-26 21:36 Adrian Klaver <adrian.klaver@aklaver.com>
parent: Rich Shepard <rshepard@appl-ecosys.com>
2 siblings, 2 replies; 14+ messages in thread
From: Adrian Klaver @ 2022-04-26 21:36 UTC (permalink / raw)
To: Rich Shepard <rshepard@appl-ecosys.com>; pgsql-general@lists.postgresql.org
On 4/26/22 2:31 PM, Rich Shepard wrote:
> 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?
I'm guessing some sort of hidden character.
What client are you using to run this?
Where is the query string coming from?
>
> TIA,
>
> Rich
>
>
--
Adrian Klaver
adrian.klaver@aklaver.com
^ permalink raw reply [nested|flat] 14+ messages in thread
* Re: Fresh eyeballs needed: input into error
@ 2022-04-26 21:51 Rich Shepard <rshepard@appl-ecosys.com>
parent: Adrian Klaver <adrian.klaver@aklaver.com>
1 sibling, 0 replies; 14+ messages in thread
From: Rich Shepard @ 2022-04-26 21:51 UTC (permalink / raw)
To: pgsql-general@lists.postgresql.org
On Tue, 26 Apr 2022, Adrian Klaver wrote:
> I'm guessing some sort of hidden character.
Adrian,
The 'insert into ...' string is a template I've been using for years. It's
worked earlier today, too.
> What client are you using to run this?
psql in a linux virtual terminal.
> Where is the query string coming from?
I type each row to add to the table by hand.
Rich
^ permalink raw reply [nested|flat] 14+ messages in thread
* Re: Fresh eyeballs needed: input into error
@ 2022-04-26 21:53 Rich Shepard <rshepard@appl-ecosys.com>
parent: Adrian Klaver <adrian.klaver@aklaver.com>
1 sibling, 2 replies; 14+ messages in thread
From: Rich Shepard @ 2022-04-26 21:53 UTC (permalink / raw)
To: pgsql-general@lists.postgresql.org
On Tue, 26 Apr 2022, Adrian Klaver wrote:
> I'm guessing some sort of hidden character.
Adrian,
Oh, ... forgot to mention in my response that the MWE values were added to
the template in emacs while I get the same error using psql -d <database> -f
<filename> in a v.t. or entering 'insert into people values (...)' within
the psql shell.
All throw the same error.
Rich
^ permalink raw reply [nested|flat] 14+ messages in thread
* Re: Fresh eyeballs needed: input into error
@ 2022-04-26 21:59 David G. Johnston <david.g.johnston@gmail.com>
parent: Rich Shepard <rshepard@appl-ecosys.com>
1 sibling, 1 reply; 14+ messages in thread
From: David G. Johnston @ 2022-04-26 21:59 UTC (permalink / raw)
To: Rich Shepard <rshepard@appl-ecosys.com>; +Cc: pgsql-generallists.postgresql.org <pgsql-general@lists.postgresql.org>
On Tue, Apr 26, 2022 at 2:54 PM Rich Shepard <rshepard@appl-ecosys.com>
wrote:
> On Tue, 26 Apr 2022, Adrian Klaver wrote:
>
> > I'm guessing some sort of hidden character.
>
> Adrian,
>
> Oh, ... forgot to mention in my response that the MWE values were added to
> the template in emacs while I get the same error using psql -d <database>
> -f
> <filename> in a v.t. or entering 'insert into people values (...)' within
> the psql shell.
>
> All throw the same error.
>
>
What version of PostgreSQL?
Testing on HEAD (and by inspection) nothing you've shown us provokes a
syntax error in PostgreSQL.
regression=> insert into people
(person_nbr,lname,fname,job_title,company_nbr,loc_nbr,
regression(>
loc_phone_ext,direct_phone,direct_fax,cell_phone,email,active,comment)
values
regression->
(6000,'No','Name',null,404,1,null,null,null,null,null,null,null);
ERROR: relation "people" does not exist
LINE 1: insert into people (person_nbr,lname,fname,job_title,company...
No syntax error, that it didn't find the table is expected.
Copied and pasted right from your email.
David J.
^ permalink raw reply [nested|flat] 14+ messages in thread
* Re: Fresh eyeballs needed: input into error
@ 2022-04-26 22:02 Tom Lane <tgl@sss.pgh.pa.us>
parent: Rich Shepard <rshepard@appl-ecosys.com>
2 siblings, 1 reply; 14+ messages in thread
From: Tom Lane @ 2022-04-26 22:02 UTC (permalink / raw)
To: Rich Shepard <rshepard@appl-ecosys.com>; +Cc: pgsql-general@lists.postgresql.org
Rich Shepard <rshepard@appl-ecosys.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
^ permalink raw reply [nested|flat] 14+ messages in thread
* Re: Fresh eyeballs needed: input into error
@ 2022-04-26 22:03 Adrian Klaver <adrian.klaver@aklaver.com>
parent: Rich Shepard <rshepard@appl-ecosys.com>
1 sibling, 0 replies; 14+ messages in thread
From: Adrian Klaver @ 2022-04-26 22:03 UTC (permalink / raw)
To: Rich Shepard <rshepard@appl-ecosys.com>; pgsql-general@lists.postgresql.org
On 4/26/22 2:53 PM, Rich Shepard wrote:
> On Tue, 26 Apr 2022, Adrian Klaver wrote:
>
>> I'm guessing some sort of hidden character.
>
> Adrian,
>
> Oh, ... forgot to mention in my response that the MWE values were added to
> the template in emacs while I get the same error using psql -d
> <database> -f
> <filename> in a v.t. or entering 'insert into people values (...)' within
> the psql shell.
>
> All throw the same error.
>
I cannot replicate. You are going to have to scan the string on your
end, I am still guessing an odd character.
> Rich
>
>
--
Adrian Klaver
adrian.klaver@aklaver.com
^ permalink raw reply [nested|flat] 14+ messages in thread
* Re: Fresh eyeballs needed: input into error
@ 2022-04-26 22:08 Rich Shepard <rshepard@appl-ecosys.com>
parent: David G. Johnston <david.g.johnston@gmail.com>
0 siblings, 1 reply; 14+ messages in thread
From: Rich Shepard @ 2022-04-26 22:08 UTC (permalink / raw)
To: pgsql-generallists.postgresql.org <pgsql-general@lists.postgresql.org>
On Tue, 26 Apr 2022, David G. Johnston wrote:
> What version of PostgreSQL?
David,
12.7
> Testing on HEAD (and by inspection) nothing you've shown us provokes a
> syntax error in PostgreSQL.
>
> regression=> insert into people
> (person_nbr,lname,fname,job_title,company_nbr,loc_nbr,
> regression(>
> loc_phone_ext,direct_phone,direct_fax,cell_phone,email,active,comment)
> values
> regression->
> (6000,'No','Name',null,404,1,null,null,null,null,null,null,null);
> ERROR: relation "people" does not exist
> LINE 1: insert into people (person_nbr,lname,fname,job_title,company...
>
> No syntax error, that it didn't find the table is expected.
Well, as I wrote, that syntax has worked for years, including earlier this
morning. Perhaps it will work again tomorrow when I log back in to the
workstation.
Thanks,
Rich
^ permalink raw reply [nested|flat] 14+ messages in thread
* Re: Fresh eyeballs needed: input into error
@ 2022-04-26 22:10 Rich Shepard <rshepard@appl-ecosys.com>
parent: Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 0 replies; 14+ messages in thread
From: Rich Shepard @ 2022-04-26 22:10 UTC (permalink / raw)
To: pgsql-general@lists.postgresql.org
On Tue, 26 Apr 2022, Tom Lane wrote:
> 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.
tom,
It's probably a transient glitch that will go away after I log out.
Thanks,
Rich
^ permalink raw reply [nested|flat] 14+ messages in thread
* Re: Fresh eyeballs needed: input into error
@ 2022-04-26 22:10 Adrian Klaver <adrian.klaver@aklaver.com>
parent: Rich Shepard <rshepard@appl-ecosys.com>
0 siblings, 0 replies; 14+ messages in thread
From: Adrian Klaver @ 2022-04-26 22:10 UTC (permalink / raw)
To: Rich Shepard <rshepard@appl-ecosys.com>; pgsql-generallists.postgresql.org <pgsql-general@lists.postgresql.org>
On 4/26/22 3:08 PM, Rich Shepard wrote:
> On Tue, 26 Apr 2022, David G. Johnston wrote:
>
>> What version of PostgreSQL?
>
> David,
>
> 12.7
>
>> Testing on HEAD (and by inspection) nothing you've shown us provokes a
>> syntax error in PostgreSQL.
>>
>> regression=> insert into people
>> (person_nbr,lname,fname,job_title,company_nbr,loc_nbr,
>> regression(>
>> loc_phone_ext,direct_phone,direct_fax,cell_phone,email,active,comment)
>> values
>> regression->
>> (6000,'No','Name',null,404,1,null,null,null,null,null,null,null);
>> ERROR: relation "people" does not exist
>> LINE 1: insert into people (person_nbr,lname,fname,job_title,company...
>>
>> No syntax error, that it didn't find the table is expected.
>
> Well, as I wrote, that syntax has worked for years, including earlier this
> morning. Perhaps it will work again tomorrow when I log back in to the
> workstation.
It is not the syntax, somewhere since this morning you introduced a
hidden character into the string.
>
> Thanks,
>
> Rich
>
>
--
Adrian Klaver
adrian.klaver@aklaver.com
^ permalink raw reply [nested|flat] 14+ messages in thread
* Re: Fresh eyeballs needed: input into error
@ 2022-04-27 10:49 Laurenz Albe <laurenz.albe@cybertec.at>
parent: Rich Shepard <rshepard@appl-ecosys.com>
2 siblings, 1 reply; 14+ messages in thread
From: Laurenz Albe @ 2022-04-27 10:49 UTC (permalink / raw)
To: Rich Shepard <rshepard@appl-ecosys.com>; pgsql-general@lists.postgresql.org
On Tue, 2022-04-26 at 14:31 -0700, Rich Shepard wrote:
> 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?
Another explanation is that there was already something in your query buffer
when you entered that statement, so that together it caused a syntactically
incorrect statement, something like (in psql):
test=> insert
test-> 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);
ERROR: syntax error at or near "insert"
LINE 2: insert into people (person_nbr,lname,fname,job_title,company...
^
Yours,
Laurenz Albe
^ permalink raw reply [nested|flat] 14+ messages in thread
* Re: Fresh eyeballs needed: input into error
@ 2022-04-27 12:43 Rich Shepard <rshepard@appl-ecosys.com>
parent: Laurenz Albe <laurenz.albe@cybertec.at>
0 siblings, 1 reply; 14+ messages in thread
From: Rich Shepard @ 2022-04-27 12:43 UTC (permalink / raw)
To: pgsql-general@lists.postgresql.org
On Wed, 27 Apr 2022, Laurenz Albe wrote:
> test=> insert
> test-> 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);
> ERROR: syntax error at or near "insert"
> LINE 2: insert into people (person_nbr,lname,fname,job_title,company...
> ^
Laurenz,
^ permalink raw reply [nested|flat] 14+ messages in thread
* Re: Fresh eyeballs needed: input into error
@ 2022-04-27 13:20 Rob Sargent <robjsargent@gmail.com>
parent: Rich Shepard <rshepard@appl-ecosys.com>
0 siblings, 1 reply; 14+ messages in thread
From: Rob Sargent @ 2022-04-27 13:20 UTC (permalink / raw)
To: Rich Shepard <rshepard@appl-ecosys.com>; +Cc: pgsql-general@lists.postgresql.org
> On Apr 27, 2022, at 5:43 AM, Rich Shepard <rshepard@appl-ecosys.com> wrote:
>
> On Wed, 27 Apr 2022, Laurenz Albe wrote:
>
>
> From time to time I mis-type a character or make another error and psql
> responds with a different prompt and no explicit explanation. I'll then type
> C-c and get the default => prompt back. Your example is appreciated and may
> very well have been the cause, but I kept trying at the default prompt.
>
> I'll re-read the psql man page to better understand the different prompts.
>
> Thank you,
>
> Rich
>
Have you tried \r instead of C-c?
>
^ permalink raw reply [nested|flat] 14+ messages in thread
* Re: Fresh eyeballs needed: input into error
@ 2022-04-27 13:36 Rich Shepard <rshepard@appl-ecosys.com>
parent: Rob Sargent <robjsargent@gmail.com>
0 siblings, 0 replies; 14+ messages in thread
From: Rich Shepard @ 2022-04-27 13:36 UTC (permalink / raw)
To: pgsql-general@lists.postgresql.org
On Wed, 27 Apr 2022, Rob Sargent wrote:
> Have you tried \r instead of C-c?
Rob,
No, I haven't. I'll try it to reset the query buffer the next time I make a
mistake entering a command.
Thanks,
Rich
^ permalink raw reply [nested|flat] 14+ messages in thread
end of thread, other threads:[~2022-04-27 13:36 UTC | newest]
Thread overview: 14+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2022-04-26 21:31 Fresh eyeballs needed: input into error Rich Shepard <rshepard@appl-ecosys.com>
2022-04-26 21:36 ` Adrian Klaver <adrian.klaver@aklaver.com>
2022-04-26 21:51 ` Rich Shepard <rshepard@appl-ecosys.com>
2022-04-26 21:53 ` Rich Shepard <rshepard@appl-ecosys.com>
2022-04-26 21:59 ` David G. Johnston <david.g.johnston@gmail.com>
2022-04-26 22:08 ` Rich Shepard <rshepard@appl-ecosys.com>
2022-04-26 22:10 ` Adrian Klaver <adrian.klaver@aklaver.com>
2022-04-26 22:03 ` Adrian Klaver <adrian.klaver@aklaver.com>
2022-04-26 22:02 ` Tom Lane <tgl@sss.pgh.pa.us>
2022-04-26 22:10 ` Rich Shepard <rshepard@appl-ecosys.com>
2022-04-27 10:49 ` Laurenz Albe <laurenz.albe@cybertec.at>
2022-04-27 12:43 ` Rich Shepard <rshepard@appl-ecosys.com>
2022-04-27 13:20 ` Rob Sargent <robjsargent@gmail.com>
2022-04-27 13:36 ` Rich Shepard <rshepard@appl-ecosys.com>
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