pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Adrian Klaver <adrian.klaver@aklaver.com>
To: Pepe TD Vo <pepevo@yahoo.com>
To: cgerard999@gmail.com
Cc: David G. Johnston <david.g.johnston@gmail.com>
Cc: Christopher Browne <cbbrowne@gmail.com>
Cc: Pgsql-admin <pgsql-admin@postgresql.org>
Cc: Pgsql-general <pgsql-general@postgresql.org>
Subject: Re: create batch script to import into postgres tables
Date: Fri, 19 Jun 2020 12:37:55 -0700
Message-ID: <58732fe2-5f50-ffd9-71ae-f757b7a61cd4@aklaver.com> (raw)
In-Reply-To: <1459334163.621977.1592594765361@mail.yahoo.com>
References: <1278700189.536786.1592579255754@mail.yahoo.com>
	<8489125B-1921-4C14-AB31-16A05AEDF6D4@gmail.com>
	<b4159903-8cca-9291-105d-3779e7a280a6@aklaver.com>
	<1459334163.621977.1592594765361@mail.yahoo.com>

On 6/19/20 12:26 PM, Pepe TD Vo 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.

There is pgAgent:
https://www.pgadmin.org/docs/pgadmin4/development/pgagent.html

> 
> 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.

But there is an option.

> 
> I am thankful for all the input.
> 
> v/r,
> 
> 
> **
> *Bach-Nga
> 
> *No one in this world is pure and perfect.  If you avoid people for 
> their mistakes you will be alone. So judge less, love, and forgive 
> more.EmojiEmojiEmoji
> To call him a dog hardly seems to do him justice though in as much as he 
> had four legs, a tail, and barked, I admit he was, to all outward 
> appearances. But to those who knew him well, he was a perfect gentleman 
> (Hermione Gingold)
> 
> **Live simply **Love generously **Care deeply **Speak kindly.
> *** Genuinely rich *** Faithful talent *** Sharing success
> 
> 
> 
> 
> On Friday, June 19, 2020, 02:24:05 PM EDT, Adrian Klaver 
> <adrian.klaver@aklaver.com> wrote:
> 
> 
> On 6/19/20 8:30 AM, cgerard999@gmail.com <mailto:cgerard999@gmail.com> 
> wrote:
>  > There is an alternate solution, which is to launch pgadmin GUI, connect
>  > to the database, tick « save password »
>  > Then psql won’t prompt fir password any more.
> 
> Pretty sure that is only within the context of pgAdmin.
> 
>  > Pay however attention to the security concern.
>  >
>  > Sent from my mobile phone
>  >
>  >> Le 19 juin 2020 à 17:07, Pepe TD Vo <pepevo@yahoo.com 
> <mailto:pepevo@yahoo.com>> a écrit :
>  >>
>  >> 
>  >> appreciate for clarification, all inputs and teaching me more in
>  >> PostgreSQL
>  >>
>  >> have a good weekend and happy father's day to all who is Father.
>  >>
>  >> v/r,
>  >>
>  >> **
>  >> *Bach-Nga
>  >>
>  >> *No one in this world is pure and perfect.  If you avoid people for
>  >> their mistakes you will be alone. So judge less, love, and forgive
>  >> more.EmojiEmojiEmoji
>  >> To call him a dog hardly seems to do him justice though in as much as
>  >> he had four legs, a tail, and barked, I admit he was, to all outward
>  >> appearances. But to those who knew him well, he was a perfect
>  >> gentleman (Hermione Gingold)
>  >>
>  >> **Live simply **Love generously **Care deeply **Speak kindly.
>  >> *** Genuinely rich *** Faithful talent *** Sharing success
>  >>
>  >>
>  >>
>  >>
>  >> On Friday, June 19, 2020, 10:57:59 AM EDT, Adrian Klaver
>  >> <adrian.klaver@aklaver.com <mailto:adrian.klaver@aklaver.com>> wrote:
>  >>
>  >>
>  >> On 6/19/20 7:52 AM, David G. Johnston wrote:
>  >> > On Fri, Jun 19, 2020 at 6:58 AM Adrian Klaver
>  >> <adrian.klaver@aklaver.com <mailto:adrian.klaver@aklaver.com> 
> <mailto:adrian.klaver@aklaver.com <mailto:adrian.klaver@aklaver.com>>
>  >> > <mailto:adrian.klaver@aklaver.com <mailto:adrian.klaver@aklaver.com>
>  >> <mailto:adrian.klaver@aklaver.com 
> <mailto:adrian.klaver@aklaver.com>>>> wrote:
>  >> >
>  >> >    On 6/19/20 6:53 AM, Pepe TD Vo wrote:
>  >> >      > Thank you sir and I am sorry for the typo not having "--" on
>  >> >    password.
>  >> >      > I did spelling out with --password=mypassword
>  >> >
>  >> >    Please go back and read my post again.
>  >> >
>  >> >
>  >> > To be clear, there is no way to supply a password as a command line
>  >> > argument.  It is fundamentally a bad idea and we don't even make it an
>  >> > option.
>  >>
>  >> Actually that is not entirely true, see my follow up post.
>  >>
>  >> >
>  >> > You need to decide on one of the actual ways of supplying a
>  >> password, or
>  >> > choose an alternative authentication method like peer.
>  >> >
>  >> > David J.
> 
>  >>
>  >> >
>  >>
>  >>
>  >> --
>  >> Adrian Klaver
>  >> adrian.klaver@aklaver.com <mailto:adrian.klaver@aklaver.com> 
> <mailto:adrian.klaver@aklaver.com <mailto:adrian.klaver@aklaver.com>>
>  >>
>  >>
> 
> 
> -- 
> Adrian Klaver
> adrian.klaver@aklaver.com <mailto:adrian.klaver@aklaver.com>
> 
> 


-- 
Adrian Klaver
adrian.klaver@aklaver.com





view thread (32+ messages)  latest in thread

Message-ID: <58732fe2-5f50-ffd9-71ae-f757b7a61cd4@aklaver.com>
Permalink:  ../58732fe2-5f50-ffd9-71ae-f757b7a61cd4@aklaver.com/
Also on:    postgresql.org/message-id/58732fe2-5f50-ffd9-71ae-f757b7a61cd4@aklaver.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: adrian.klaver@aklaver.com, pepevo@yahoo.com, cgerard999@gmail.com, david.g.johnston@gmail.com, cbbrowne@gmail.com, pgsql-general@postgresql.org
  Subject: Re: create batch script to import into postgres tables
  In-Reply-To: <58732fe2-5f50-ffd9-71ae-f757b7a61cd4@aklaver.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