Re: Multi-row insert: error at terminal row. [RESOLVED]

2020-10-29 Thread Rich Shepard
On Thu, 29 Oct 2020, Rob Sargent wrote: Would it be rude to suggest that you re-visit how that file was made? Seems you'll be in the same boat "next time". Rob, Part of the files was exported from the old version of the database. New rows were from different text files, each with a different

Re: Multi-row insert: error at terminal row. [RESOLVED]

2020-10-29 Thread Rob Sargent
On 10/29/20 2:07 PM, Rich Shepard wrote: On Thu, 29 Oct 2020, Adrian Klaver wrote: Is it just the 50 line version? Adrian, Nope. If it is, what happens if you go back to original 1925 line version and correct the NULL issue in the line 26 and run it again? I'm finding typos and column

Re: Multi-row insert: error at terminal row. [RESOLVED]

2020-10-29 Thread Rich Shepard
On Thu, 29 Oct 2020, Adrian Klaver wrote: Is it just the 50 line version? Adrian, Nope. If it is, what happens if you go back to original 1925 line version and correct the NULL issue in the line 26 and run it again? I'm finding typos and column tranposition errors that I had not spotted w

Re: Multi-row insert: error at terminal row. [RESOLVED]

2020-10-29 Thread Adrian Klaver
On 10/29/20 10:52 AM, Rich Shepard wrote: On Thu, 29 Oct 2020, Adrian Klaver wrote: Is orgs-1.sql just the INSERT? Yes. Is it just the 50 line version? If it is, what happens if you go back to original 1925 line version and correct the NULL issue in the line 26 and run it again? How

Re: Multi-row insert: error at terminal row. [RESOLVED]

2020-10-29 Thread Rich Shepard
On Thu, 29 Oct 2020, Adrian Klaver wrote: Is orgs-1.sql just the INSERT? Yes. How is that file being fed to psql? $ psql -d bustrac -f orgs-1.sql Rich

Re: Multi-row insert: error at terminal row. [RESOLVED]

2020-10-29 Thread Adrian Klaver
On 10/29/20 10:39 AM, Rich Shepard wrote: On Thu, 29 Oct 2020, Rich Shepard wrote: psql:organizations.sql:1926: ERROR:  syntax error at or near ";" LINE 1925: ...m',null,'Port','Opportunity',null);     ^ I'm not seeing why that's an error. All previ

Re: Multi-row insert: error at terminal row. [RESOLVED]

2020-10-29 Thread David G. Johnston
On Thu, Oct 29, 2020, 10:39 Rich Shepard wrote: > On Thu, 29 Oct 2020, Rich Shepard wrote: > > > psql:organizations.sql:1926: ERROR: syntax error at or near ";" > > LINE 1925: ...m',null,'Port','Opportunity',null); > ^ > > I'm not seeing why that'

Re: Multi-row insert: error at terminal row. [RESOLVED]

2020-10-29 Thread Tom Lane
Rich Shepard writes: > Found the problem in line 26 of 1925 rows: a non-null column had 'null' > entered rather than one of the allowed values. That row was in the original > database and I've no idea when I might have changed that. > Why postgres didn't highlight that until I had only a 50-line

Re: Multi-row insert: error at terminal row. [RESOLVED]

2020-10-29 Thread Rich Shepard
On Thu, 29 Oct 2020, Rich Shepard wrote: psql:organizations.sql:1926: ERROR: syntax error at or near ";" LINE 1925: ...m',null,'Port','Opportunity',null); ^ I'm not seeing why that's an error. All previous rows terminate with a comma and I don't

Re: Multi-row insert: error at terminal row. [RESOLVED]

2020-10-29 Thread Rich Shepard
On Thu, 29 Oct 2020, Adrian Klaver wrote: Pretty sure the thinking is that the opening parenthesis is further upstream, say around VALUES? Well, duh! Of course. I forgot to enclose all value rows. Mea culpa! Thanks, Rich