Postgres Logon Parameters, Examples of IP address Logons Please

Andrew Stolarz stolarz at gmail.com
Fri Jan 19 15:32:00 EST 2018


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
>



More information about the omnisdev-en mailing list