From: | "Tomeh, Husam" <htomeh(at)firstam(dot)com> |
---|---|
To: | pgsql-admin(at)postgresql(dot)org |
Subject: | Re: Can you generate SQL by using SQL in Postgres? |
Date: | 2005-05-19 21:55:20 |
Message-ID: | C45835824D00A844BBD0F032D5CDED920116DAD2@pisgana01sxch01.ana.firstamdata.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin |
That worked for me. Thanks Jason.
--
Husam
-----Original Message-----
From: Jason Minion [mailto:jason(dot)minion(at)sigler(dot)com]
Sent: Thursday, May 19, 2005 12:06 PM
To: Tomeh, Husam
Cc: pgsql-admin(at)postgresql(dot)org
Subject: RE: [ADMIN] Can you generate SQL by using SQL in Postgres?
I would recommend against passing a password on the command line, as
that will show up on process lists. You really want to use a .pgpass
file. I found this discussion on google that may be of interest to you:
http://www.issociate.de/board/post/195308/PostgreSQL_Backup_Script.html
For information on .pgpass file, check:
http://www.postgresql.org/docs/8.0/interactive/libpq-pgpass.html
When used correctly .pgpass files result in no less security than having
a password in plain text in another file on the system. Note the
permission restrictions.
If you are writing an application using C, Perl, etc you should directly
connect using libpq, DBI, etc and pass the credentials that way.
Good luck!
Jason Minion
IT Developer
Sigler Printing & Publishing
413 Northwestern Ave
Ames, IA 50010
515-232-6997
jason(dot)minion(at)sigler(dot)com
-----Original Message-----
From: pgsql-admin-owner(at)postgresql(dot)org
[mailto:pgsql-admin-owner(at)postgresql(dot)org]On Behalf Of Tomeh, Husam
Sent: Thursday, May 19, 2005 1:20 PM
To: Tomeh, Husam; pgsql-admin(at)postgresql(dot)org
Subject: Re: [ADMIN] Can you generate SQL by using SQL in Postgres?
I figured out item #1 , generating SQL by using SQL and the system
tables (I guess I just needed to know the postgres system tables
available). However, item 2 is still not resolved.
Thanks,
--
Husam
-----Original Message-----
From: pgsql-admin-owner(at)postgresql(dot)org
[mailto:pgsql-admin-owner(at)postgresql(dot)org] On Behalf Of Tomeh, Husam
Sent: Thursday, May 19, 2005 10:11 AM
To: pgsql-admin(at)postgresql(dot)org
Subject: [ADMIN] Can you generate SQL by using SQL in Postgres?
Generating SQL from another SQL statement simply means writing an SQL
statement whose output forms another SQL statement or command.
1) Can you generate SQL by using SQL in Postgres? This question is
essential to DBAs because they can generate lots of DLL on the fly from
one single SQL statement and it'll make life much easier and more
efficient. I use it with Oracle and was wondering if it's doable in
Postgres and maybe an example would be even better.
2) the other question is related to passing logon password along with
the user ID or connect string (instead of interactively typing the
password). For instance, psql -d myDB -U husam - Can I pass the
password here. Or inside psq using connect l : \c myDB .....
Thanks,
--
Husam
---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster
**********************************************************************
This message contains confidential information intended only for the use
of the addressee(s) named above and may contain information that is
legally privileged. If you are not the addressee, or the person
responsible for delivering it to the addressee, you are hereby notified
that reading, disseminating, distributing or copying this message is
strictly prohibited. If you have received this message by mistake,
please immediately notify us by replying to the message and delete the
original message immediately thereafter.
Thank you. FADLD Tag
**********************************************************************
---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster
---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster
From | Date | Subject | |
---|---|---|---|
Next Message | sandhya | 2005-05-20 10:03:11 | reg:relocation error |
Previous Message | Scott Marlowe | 2005-05-19 19:30:53 | Re: how to ignore case |