pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Frank Alberto Rodriguez <franknigth@gmail.com>
To: pgsql-admin@lists.postgresql.org
Subject: Re: How to insert from linux to postgreSQL
Date: Tue, 09 Apr 2019 11:22:09 -0500
Message-ID: <a8419f27b80e56b93cd2e53a155b4e37125a9c67.camel@gmail.com> (raw)
In-Reply-To: <4FB9BF8B-D26C-40FB-9A9C-DEB4FB016292@illinois.edu>
References: <4FB9BF8B-D26C-40FB-9A9C-DEB4FB016292@illinois.edu>

Then why not using java? Just exec the .jar with the terminal params
and do de job in java, or read a configuration file.Or you could use
PL/java.
https://tada.github.io/pljava/  Greetings  

On Mon, 2019-04-08 at 19:03 +0000, Campbell, Lance wrote:
> PostgreSQL 10.x
>  
> Use case:
> I want to read a log file on my linux server and write each line out
> to a row in a postgreSQL table.  When I do inserts however I want to
> make sure I am using prepared statements to avoid SQL injections. 
>  I know how to do this is Java but I have not found an example using
> a linux bash scripts. 
> 
>  
> Does anyone have an example they could point me to?
>  
> Thanks,
>  
> Lance
>  
> 
> 
> 

view thread (6+ messages)

Message-ID: <a8419f27b80e56b93cd2e53a155b4e37125a9c67.camel@gmail.com>
Permalink:  ../a8419f27b80e56b93cd2e53a155b4e37125a9c67.camel@gmail.com/
Also on:    postgresql.org/message-id/a8419f27b80e56b93cd2e53a155b4e37125a9c67.camel@gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: franknigth@gmail.com, pgsql-admin@lists.postgresql.org
  Subject: Re: How to insert from linux to postgreSQL
  In-Reply-To: <a8419f27b80e56b93cd2e53a155b4e37125a9c67.camel@gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox