Search Postgresql Archives

Re: Insertion of large xml files into PostgreSQL 10beta1

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

 



Hello Jan, Hello David,

I'll be able to do further testing next week as I am in the middle of
a move but for next week, I'll be in vacation from work for the whole
month.

Best regards,

Alain

2017-06-29 0:13 GMT-04:00 David G. Johnston <david.g.johnston@xxxxxxxxx>:
> On Sun, Jun 25, 2017 at 8:02 PM, Alain Toussaint <atoussaint1976@xxxxxxxxx>
> wrote:
>>
>>
>> echo "INSERT INTO samples (xmldata) VALUES $(cat
>> /srv/pgsql/pubmed/medline17n0001.xml)" | /usr/bin/psql medline
>> 1>/dev/null 2>error.log
>
>
> Typically I do:
>
> --psql file
> \set xmlcontent `cat 'projectblogs-categories.xml'`
> INSERT INTO tbl (col) VALUES (:'xmlcontent');
>
> though at the moment I cannot recollect whether the above munges whitespace.
> I copied it from some json processing code where I wouldn't care if it
> did...
>
> If you want to do something with INSERT/VALUES you should refresh yourself
> as to the syntax for the VALUES SQL Command.  Namely non-optional
> parentheses.
>
> I'd also suggest you try to get a one or two line file importing correctly
> first.
>
> David J.
>


-- 
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