Skip site navigation (1) Skip section navigation (2)

Can you generate SQL by using SQL in Postgres?

From: "Tomeh, Husam" <htomeh(at)firstam(dot)com>
To: pgsql-admin(at)postgresql(dot)org
Subject: Can you generate SQL by using SQL in Postgres?
Date: 2005-05-19 17:10:50
Message-ID: C45835824D00A844BBD0F032D5CDED920116DACC@pisgana01sxch01.ana.firstamdata.com (view raw or flat)
Thread:
Lists: pgsql-admin
 
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
**********************************************************************


pgsql-admin by date

Next:From: Chuming ChenDate: 2005-05-19 17:14:14
Subject: database connection
Previous:From: Scott MarloweDate: 2005-05-19 16:57:29
Subject: Re: postgresql database connection

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group