calling postgresql from the command line or within a .lc script

Pierre Sahores sc at sahores-conseil.com
Sat Aug 18 20:01:30 EDT 2012


The way we can use to deal around this server's security rule is to create serial of tables instead of a complete new database. This permit to do it by (LC-derver) script and works perfectly fine. Very handy to create companion's subdomains db backends on demand in saas contexts.

Le 19 août 2012 à 00:20, Dr. Hawkins a écrit :

> I just can't find a livecode lesson that doesn't just directly access a
> MySQL port . . .
> 
> I think I'm far enough along with livecode server to take a swing at
> talking to postgresql
> 
> I try
> put revOpenDatabase("postgresql", "dochawkbk.on-rev.com"
> ,"dochawkb_aTestDb","dochawkb","yeeHaw52!" ) into dbno
> put dbno & "<p>"
> 
> 
> and get
> could not connect to server: Connection refused Is the server running on
> host "dochawkbk.on-rev.com" and accepting TCP/IP connections on port 5432?
> 
> It *should* be, shouldn't it--this is on on-rev.com?
> 
> SO I replace with "localhost" for the host, and get,
> FATAL: database "dochawkb_aTestDb" does not exist
> 
> I take it that this means that I *am* talking to the postgresql socket?
> 
> So I take a stroll to the phppgadmin page, and find the  "alter" section.
> 
> I don't have createdb checked for me.  I check it, give it passwords, and
> get the message that
> 
> *SQL error:*
> 
> ERROR:  must be superuser to alter superusers
> 
> Hmm, if I can't do this from the panel, how can I possibly create a new
> database from a script, whether lc or sh?
> -- 
> The Hawkins Law Firm
> Richard E. Hawkins, Esq.
> (702) 508-8462
> HawkinsLawFirm at gmail.com
> 3025 S. Maryland Parkway
> Suite A
> Las Vegas, NV  89109
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode

--
Pierre Sahores
mobile : 06 03 95 77 70
www.sahores-conseil.com





More information about the use-livecode mailing list