Re: create batch script to import into postgres tables

Поиск
Список
Период
Сортировка
От Rob Sargent
Тема Re: create batch script to import into postgres tables
Дата
Msg-id EA7A2905-B9C3-4C5E-859E-E9B6D4692162@gmail.com
обсуждение исходный текст
Ответ на Re: create batch script to import into postgres tables  (Pepe TD Vo <pepevo@yahoo.com>)
Список pgsql-admin


On Jun 19, 2020, at 1:26 PM, Pepe TD Vo <pepevo@yahoo.com> wrote:

thank you for all the information but I have no problem connecting to the database using pgAdmin and/or directly psql from the postgres database.

I need to set up a batch/cron job to run in Linux/AWS to ingest the data.  Therefore pgadmin GUI is not an option. I used pgAdmin to create tables, triggers, function triggers and manual importing/exporting.  You can't schedule a time to run importing from  csv file(s) using pgAdmin as same OEM.  

The select table in this question is just an example for me to create scripting to see it connect or not.  No one at work to manually run the script and enter the password.  Need to bypass it like Oracle scripting.  Since this is not an option to put the password to connect to the database and run the script(s), we will find another way to do.

I am thankful for all the input.  

v/r,

And it has been explained upstream that one “way to do” is to use a .pgpass file for the cronjob user.  And that file must be read-only to user, no access to group or other (chmod 400 $CRONUSER/.pgpass).  Another is a “trust” entry for the user in pg_hba.conf.  I suggest you revisit those messages. 
 


В списке pgsql-admin по дате отправления:

Предыдущее
От: Pepe TD Vo
Дата:
Сообщение: Re: create batch script to import into postgres tables
Следующее
От: Adrian Klaver
Дата:
Сообщение: Re: create batch script to import into postgres tables