Re: How to insert from linux to postgreSQL

Поиск
Список
Период
Сортировка
Искать
От
Rui DeSousa
Тема
Re: How to insert from linux to postgreSQL
Дата
Msg-id
80D01A64-24BA-420D-B963-2F8BCDA8AA7D@crazybean.net
Ответ на
Список
Дерево обсуждения
How to insert from linux to postgreSQL "Campbell, Lance" <lance@illinois.edu>
Re: How to insert from linux to postgreSQL Rui DeSousa <rui@crazybean.net>
Re: How to insert from linux to postgreSQL Frank Alberto Rodriguez <franknigth@gmail.com>
Re: How to insert from linux to postgreSQL Ron <ronljohnsonjr@gmail.com>
Re: How to insert from linux to postgreSQL Scott Whitney <scott@journyx.com>
Re: How to insert from linux to postgreSQL "Peter M. Groen" <peter@osdev.nl>
I would use psql \copy command within a shell script or just not use it.  

Personally, I would choose Perl or GoLang if it requires parsing the data before inserting.  



On Apr 8, 2019, at 3:03 PM, Campbell, Lance <lance@illinois.edu> 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

В списке pgsql-admin по дате отправления
От: Scott Whitney
Дата:
От: Silvio Brandani - SDB Information Technology Srl
Дата:
FAQ