Re: How to insert from linux to postgreSQL

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

 



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


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux