Re: [GENERAL] Insertion of large xml files into PostgreSQL 10beta1 - Mailing list pgsql-general

From Jan de Visser
Subject Re: [GENERAL] Insertion of large xml files into PostgreSQL 10beta1
Date
Msg-id 4873209.fKVuGm9KQG@coyote
Whole thread Raw
In response to Re: [GENERAL] Insertion of large xml files into PostgreSQL 10beta1  (Alain Toussaint <atoussaint1976@gmail.com>)
List pgsql-general
On Sunday, June 25, 2017 11:02:41 PM EDT Alain Toussaint wrote:
> > Narrowing down the entire file to a small problem region and posting a
> > self-contained example,
>
> The url here contain the set of xml records from a publication I
> worked on many years ago:
>
> https://www.ncbi.nlm.nih.gov/pubmed/21833294?report=xml&format=text
>
> The particularly problematic region of the xml content is this:
>
>         <CommentsCorrectionsList>
>             <CommentsCorrections RefType="Cites">
>                 <RefSource>Neuroreport. 2000 Sep
> 11;11(13):2969-72</RefSource> <PMID Version="1">11006976</PMID>
>             </CommentsCorrections>
>             <CommentsCorrections RefType="Cites">
>                 <RefSource>J Neurosci. 2005 May
> 25;25(21):5148-58</RefSource> <PMID Version="1">15917455</PMID>
>             </CommentsCorrections>
>             <CommentsCorrections RefType="Cites">
>                 <RefSource>Neuroimage. 2003 Dec;20(4):1944-54</RefSource>
>                 <PMID Version="1">14683700</PMID>
>             </CommentsCorrections>
>
> There is more of these type of comments in an given citation.
>
> > or at least providing the error messages and
> > content, might help elicit good responses.
>
> here it is:
>
> ERROR: syntax error at or near "44"
> LINE 1: 44(1):37-43</RefSources>

This string does not appear in your link above. Please match your example data
with your error message.

>
> the command I used is this one:
>
> echo "INSERT INTO samples (xmldata) VALUES $(cat
> /srv/pgsql/pubmed/medline17n0001.xml)" | /usr/bin/psql medline
> 1>/dev/null 2>error.log

I'm going to go out on a limb and assume the problem is unescaped quote
characters, or some other escape/quote problem. Hard to say though without
having the right data to look at.





pgsql-general by date:

Previous
From: Merlin Moncure
Date:
Subject: Re: [GENERAL] Is the row version available in SQL?
Next
From: "David G. Johnston"
Date:
Subject: Re: [GENERAL] Insertion of large xml files into PostgreSQL 10beta1