PostgreSQL setting the $programname property

Paul Mulroney pmulroney at logicaldevelopments.com.au
Tue Nov 7 00:47:57 UTC 2023


Hi John,

That didn't work for me.  If I do something like that, it wouldn't display in the pg_stat_activity table.

What version of Postgres are you using?  We're still on 9.4 (Yes, I know it's old, we're planning to upgrade to something more current very soon!)

Regards
Paul.

> On 7 Nov 2023, at 6:32 am, John Boehme <john at integralservices.biz> wrote:
> 
> Hi Paul,
> 
> We do this:
> 
> Do pSession.$programname.$assign($ctask.$app().$appTitleShort())
> 
> And the application name appears in the Postgre status display of connections.
> 
> 
> John Boehme
> 940-597-3046
> 
> -----Original Message-----
> From: omnisdev-en [mailto:omnisdev-en-bounces at lists.omnis-dev.com] On Behalf Of Paul Mulroney
> Sent: Sunday, November 5, 2023 11:25 PM
> To: Omnis-dev list
> Subject: O$: PostgreSQL setting the $programname property
> 
> Hi Everyone,
> 
> Has anyone tried to use the $programname property of a PGSession object?  I'd like to tell Postgres the application that's running (eg Omnis), so that I can see it in the pg_stat_activity table, but I can't seem to get it to work.
> 
> I'm basically doing this:
> 
> Calculate voSession.$programname as 'Fred'
> 
> Am I missing anything?
> 
> Regards,
> Paul.
> 
> 
> I remember the first time I saw a universal remote control … I though to myself "Well, this changes everything"
> -- 
> Paul W. Mulroney                                            We Don't Do Simple Pty Ltd 
> pmulroney at logicaldevelopments.com.au       Trading as Logical Developments
> www.logicaldevelopments.com.au                   ACN 161 009 374 
> Ph: +61 8 9458 3889                                       86 Coolgardie Street
>                                                                         BENTLEY  WA  6102
> 
> 
> 
> _____________________________________________________________
> Manage your list subscriptions at https://lists.omnis-dev.com Start a new message -> mailto:omnisdev-en at lists.omnis-dev.com 
> 
> _____________________________________________________________
> Manage your list subscriptions at https://lists.omnis-dev.com
> Start a new message -> mailto:omnisdev-en at lists.omnis-dev.com 


Computers make very fast, very accurate mistakes.
(Geeky One Line Jokes http://bit.ly/XU8lFD)
-- 
Paul W. Mulroney                                            We Don't Do Simple Pty Ltd 
pmulroney at logicaldevelopments.com.au       Trading as Logical Developments
www.logicaldevelopments.com.au                   ACN 161 009 374 
Ph: +61 8 9458 3889                                       86 Coolgardie Street
                                                                         BENTLEY  WA  6102





More information about the omnisdev-en mailing list