Search Postgresql Archives

Re: Insertion of large xml files into PostgreSQL 10beta1

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.





-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux