Connection type

Started by Enrico Pirozziabout 8 years ago3 messagesgeneral
Jump to latest
#1Enrico Pirozzi
e.pirozzi@nbsgroup.it

Hi,

is there a way to know what kind of connection a client is doing?
(ODBC,JDBC..etc)

I saw the pg_stat_activity view,

but in the application name field there no infomation about
what kind of connection a client is doing.

Thanks

Enrico

e.pirozzi@nbsgroup.it

#2Steve Atkins
steve@blighty.com
In reply to: Enrico Pirozzi (#1)
Re: Connection type

On Jan 18, 2018, at 4:06 PM, Enrico Pirozzi <e.pirozzi@nbsgroup.it> wrote:

Hi,

is there a way to know what kind of connection a client is doing? (ODBC,JDBC..etc)

I saw the pg_stat_activity view,

but in the application name field there no infomation about
what kind of connection a client is doing.

No. They're all exactly the same as far as postgresql is concerned all speaking the
same postgresql native protocol, or close enough. The ODBC / JDBC / libpq difference
is purely on the client side.

A client can voluntarily set the application_name, e.g. as part of it's connection string,
to identify itself to the server, if you want to be able to identify which sort of client
is connected easily.

Cheers,
Steve

#3Enrico Pirozzi
e.pirozzi@nbsgroup.it
In reply to: Steve Atkins (#2)
Re: Connection type

Il 18/01/2018 17:19, Steve Atkins ha scritto:

A client can voluntarily set the application_name, e.g. as part of it's connection string,
to identify itself to the server, if you want to be able to identify which sort of client
is connected easily.

Thank you very much :)

Regards
Enrico