| From: | Ron <ronljohnsonjr(at)gmail(dot)com> |
|---|---|
| To: | pgsql-admin(at)lists(dot)postgresql(dot)org |
| Subject: | Re: How to insert from linux to postgreSQL |
| Date: | 2019-04-08 19:18:18 |
| Message-ID: | ecfa6666-5334-7811-8328-2a953b76c932@gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-admin |
On 4/8/19 2:03 PM, 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.
>
Presumably some manipulations need to be performed so that you can't just do
COPY FROM STDIN?
> 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?
>
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.
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Scott Whitney | 2019-04-08 19:20:03 | Re: How to insert from linux to postgreSQL |
| Previous Message | Campbell, Lance | 2019-04-08 19:03:15 | How to insert from linux to postgreSQL |