Is the log file "ready" for INSERT, line by line? If not, you need to preprocess it. The 2 solutions I would use are psycopg for Python or sed + INSERT depending.
From: Ron <ronljohnsonjr@xxxxxxxxx>
Sent: Monday, April 8, 2019 2:18:18 PM To: pgsql-admin@xxxxxxxxxxxxxxxxxxxx Subject: Re: How to insert from linux to postgreSQL On 4/8/19 2:03 PM, Campbell, Lance wrote:
Presumably some manipulations need to be performed so that you can't just do COPY FROM STDIN?
I think the problem is that you need an open connection to use prepared statements, and you can't do that in bash. What about using Python? (After all, that's a scripting language, too.) --
Angular momentum makes the world go 'round.
To unsubscribe from Journyx promotional emails, click
here or visit http://journyx.com/communication-preferences.
|