Postgres Logon Parameters, Examples of IP address Logons Please

Mike Rowan michael.rowan3 at gmail.com
Sat Jan 20 07:55:45 EST 2018


Hi Das
A couple of things not mentioned to date for the PostgreSQL usage, and a bit obscure, are

You must set the port and database_name before your $logon() line.

I my case its like this

Calculate tvSessionPG.database as ‘name_of_database’
Calculate tvSessionPG.$port as 5432 

Then in your $logon() the second parameter is the logon role you have created in PostgreSQL.

(Now I wait for B.. and others to tell me I’m doing it all wrong!  Happy days.)

Mike
> On 20 Jan 2018, at 7:02 am, Andrew Stolarz <stolarz at gmail.com> wrote:
> 
> Hi Das
> 
> Here is a basic rough example on how to establish a connection using MySQL
> (I don't have access to Postgresql at the moment). Im pretty sure you can
> swap out the MySQL dam references with the postgresql one and it will work
> as is.
> 
> -----
> 
> Calculate %%Host as 'ip_address'
> Calculate %%Database as 'database_name'
> Calculate %%DBUser as 'username'
> Calculate %%DBPwd as 'password'
> 
> Do $extobjects.MYSQLDAM.$objects.MYSQLSESS.$new() Returns
> $ctask.tSessionObject
> 
> Do $ctask.tSessionObject.$database.$assign(%%Database)
> Do $ctask.tSessionObject.$logon(%%Host,%%DBUser,%%DBPwd) Returns #F
> 
> If flag false
> OK message Alert (Icon) {Error connecting to database[kCr][kCr][con('Error
> Code:',$ctask.tSessionObject.$nativeerrorcode,'.
> ',$ctask.tSessionObject.$nativeerrortext)]}
> Quit method kFalse
> End If
> 
> -----
> 
> 
> Andrew
> 
> 
> 
> 
> On Fri, Jan 19, 2018 at 2:51 PM, Das Goravani <das at goravani.com> wrote:
> 
>> Hello,
>> 
>> These are postgres log on parameters as they supply for the Mac App
>> version of Postgres
>> 
>> Can anyone tell me how these work into the Omnis $logon() function, what
>> to put where
>> 
>> Or, show me how you calculate your logon for Postgres with an IP adress as
>> I also downloaded their complete server product.
>> 
>> 
>> Host    localhost
>> Port    5432
>> User    your system user name
>> Database        same as user
>> Password        none
>> Connection URL  postgresql://localhost
>> 
>> thanks
>> 
>> Das Goravani
>> _____________________________________________________________
>> Manage your list subscriptions at http://lists.omnis-dev.com
>> 
> _____________________________________________________________
> Manage your list subscriptions at http://lists.omnis-dev.com




More information about the omnisdev-en mailing list