public inbox for [email protected]
help / color / mirror / Atom feed[pgAdmin4][PATCH] To fix the issue in server stats sql (PPAS9.2)
2+ messages / 2 participants
[nested] [flat]
* [pgAdmin4][PATCH] To fix the issue in server stats sql (PPAS9.2)
@ 2017-05-16 15:43 Murtuza Zabuawala <[email protected]>
2017-05-17 14:53 ` Re: [pgAdmin4][PATCH] To fix the issue in server stats sql (PPAS9.2) Dave Page <[email protected]>
0 siblings, 1 reply; 2+ messages in thread
From: Murtuza Zabuawala @ 2017-05-16 15:43 UTC (permalink / raw)
To: pgadmin-hackers
Hi,
PFA minor patch to fix the in server stats sql where it was fails to
execute because it is not able to concat inet (type) when using with ||
operator.
*Fails:*
select client_addr || ':' || client_port from pg_stat_activity
*Works:*
select client_addr::text || ':' || client_port from pg_stat_activity
Fixes RM#1831
--
Regards,
Murtuza Zabuawala
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
diff --git a/web/pgadmin/browser/server_groups/servers/templates/servers/sql/9.2_plus/stats.sql b/web/pgadmin/browser/server_groups/servers/templates/servers/sql/9.2_plus/stats.sql
index 0b397f6..189db28 100644
--- a/web/pgadmin/browser/server_groups/servers/templates/servers/sql/9.2_plus/stats.sql
+++ b/web/pgadmin/browser/server_groups/servers/templates/servers/sql/9.2_plus/stats.sql
@@ -7,7 +7,7 @@ SELECT
WHEN client_hostname IS NOT NULL AND client_hostname != '' THEN
client_hostname || ':' || client_port
WHEN client_addr IS NOT NULL AND client_addr::text != '' THEN
- client_addr || ':' || client_port
+ client_addr::text || ':' || client_port
WHEN client_port = -1 THEN
'local pipe'
ELSE
@@ -32,7 +32,7 @@ SELECT
WHEN client_hostname IS NOT NULL AND client_hostname != '' THEN
client_hostname || ':' || client_port
WHEN client_addr IS NOT NULL AND client_addr::text != '' THEN
- client_addr || ':' || client_port
+ client_addr::text || ':' || client_port
WHEN client_port = -1 THEN
'local pipe'
ELSE
diff --git a/web/pgadmin/browser/server_groups/servers/templates/servers/sql/9.6_plus/stats.sql b/web/pgadmin/browser/server_groups/servers/templates/servers/sql/9.6_plus/stats.sql
index a1dbc37..99bf2f4 100644
--- a/web/pgadmin/browser/server_groups/servers/templates/servers/sql/9.6_plus/stats.sql
+++ b/web/pgadmin/browser/server_groups/servers/templates/servers/sql/9.6_plus/stats.sql
@@ -7,7 +7,7 @@ SELECT
WHEN client_hostname IS NOT NULL AND client_hostname != '' THEN
client_hostname || ':' || client_port
WHEN client_addr IS NOT NULL AND client_addr::text != '' THEN
- client_addr || ':' || client_port
+ client_addr::text || ':' || client_port
WHEN client_port = -1 THEN
'local pipe'
ELSE
@@ -33,7 +33,7 @@ SELECT
WHEN client_hostname IS NOT NULL AND client_hostname != '' THEN
client_hostname || ':' || client_port
WHEN client_addr IS NOT NULL AND client_addr::text != '' THEN
- client_addr || ':' || client_port
+ client_addr::text || ':' || client_port
WHEN client_port = -1 THEN
'local pipe'
ELSE
diff --git a/web/pgadmin/browser/server_groups/servers/templates/servers/sql/default/stats.sql b/web/pgadmin/browser/server_groups/servers/templates/servers/sql/default/stats.sql
index 54447ba..6255219 100644
--- a/web/pgadmin/browser/server_groups/servers/templates/servers/sql/default/stats.sql
+++ b/web/pgadmin/browser/server_groups/servers/templates/servers/sql/default/stats.sql
@@ -7,7 +7,7 @@ SELECT
WHEN client_hostname IS NOT NULL AND client_hostname != '' THEN
client_hostname || ':' || client_port
WHEN client_addr IS NOT NULL AND client_addr::text != '' THEN
- client_addr || ':' || client_port
+ client_addr::text || ':' || client_port
WHEN client_port = -1 THEN
'local pipe'
ELSE
@@ -32,7 +32,7 @@ SELECT
WHEN client_hostname IS NOT NULL AND client_hostname != '' THEN
client_hostname || ':' || client_port
WHEN client_addr IS NOT NULL AND client_addr::text != '' THEN
- client_addr || ':' || client_port
+ client_addr::text || ':' || client_port
WHEN client_port = -1 THEN
'local pipe'
ELSE
--
Sent via pgadmin-hackers mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers
Attachments:
[text/plain] fix_server_stats.diff (3.3K, 3-fix_server_stats.diff)
download | inline diff:
diff --git a/web/pgadmin/browser/server_groups/servers/templates/servers/sql/9.2_plus/stats.sql b/web/pgadmin/browser/server_groups/servers/templates/servers/sql/9.2_plus/stats.sql
index 0b397f6..189db28 100644
--- a/web/pgadmin/browser/server_groups/servers/templates/servers/sql/9.2_plus/stats.sql
+++ b/web/pgadmin/browser/server_groups/servers/templates/servers/sql/9.2_plus/stats.sql
@@ -7,7 +7,7 @@ SELECT
WHEN client_hostname IS NOT NULL AND client_hostname != '' THEN
client_hostname || ':' || client_port
WHEN client_addr IS NOT NULL AND client_addr::text != '' THEN
- client_addr || ':' || client_port
+ client_addr::text || ':' || client_port
WHEN client_port = -1 THEN
'local pipe'
ELSE
@@ -32,7 +32,7 @@ SELECT
WHEN client_hostname IS NOT NULL AND client_hostname != '' THEN
client_hostname || ':' || client_port
WHEN client_addr IS NOT NULL AND client_addr::text != '' THEN
- client_addr || ':' || client_port
+ client_addr::text || ':' || client_port
WHEN client_port = -1 THEN
'local pipe'
ELSE
diff --git a/web/pgadmin/browser/server_groups/servers/templates/servers/sql/9.6_plus/stats.sql b/web/pgadmin/browser/server_groups/servers/templates/servers/sql/9.6_plus/stats.sql
index a1dbc37..99bf2f4 100644
--- a/web/pgadmin/browser/server_groups/servers/templates/servers/sql/9.6_plus/stats.sql
+++ b/web/pgadmin/browser/server_groups/servers/templates/servers/sql/9.6_plus/stats.sql
@@ -7,7 +7,7 @@ SELECT
WHEN client_hostname IS NOT NULL AND client_hostname != '' THEN
client_hostname || ':' || client_port
WHEN client_addr IS NOT NULL AND client_addr::text != '' THEN
- client_addr || ':' || client_port
+ client_addr::text || ':' || client_port
WHEN client_port = -1 THEN
'local pipe'
ELSE
@@ -33,7 +33,7 @@ SELECT
WHEN client_hostname IS NOT NULL AND client_hostname != '' THEN
client_hostname || ':' || client_port
WHEN client_addr IS NOT NULL AND client_addr::text != '' THEN
- client_addr || ':' || client_port
+ client_addr::text || ':' || client_port
WHEN client_port = -1 THEN
'local pipe'
ELSE
diff --git a/web/pgadmin/browser/server_groups/servers/templates/servers/sql/default/stats.sql b/web/pgadmin/browser/server_groups/servers/templates/servers/sql/default/stats.sql
index 54447ba..6255219 100644
--- a/web/pgadmin/browser/server_groups/servers/templates/servers/sql/default/stats.sql
+++ b/web/pgadmin/browser/server_groups/servers/templates/servers/sql/default/stats.sql
@@ -7,7 +7,7 @@ SELECT
WHEN client_hostname IS NOT NULL AND client_hostname != '' THEN
client_hostname || ':' || client_port
WHEN client_addr IS NOT NULL AND client_addr::text != '' THEN
- client_addr || ':' || client_port
+ client_addr::text || ':' || client_port
WHEN client_port = -1 THEN
'local pipe'
ELSE
@@ -32,7 +32,7 @@ SELECT
WHEN client_hostname IS NOT NULL AND client_hostname != '' THEN
client_hostname || ':' || client_port
WHEN client_addr IS NOT NULL AND client_addr::text != '' THEN
- client_addr || ':' || client_port
+ client_addr::text || ':' || client_port
WHEN client_port = -1 THEN
'local pipe'
ELSE
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: [pgAdmin4][PATCH] To fix the issue in server stats sql (PPAS9.2)
2017-05-16 15:43 [pgAdmin4][PATCH] To fix the issue in server stats sql (PPAS9.2) Murtuza Zabuawala <[email protected]>
@ 2017-05-17 14:53 ` Dave Page <[email protected]>
0 siblings, 0 replies; 2+ messages in thread
From: Dave Page @ 2017-05-17 14:53 UTC (permalink / raw)
To: Murtuza Zabuawala <[email protected]>; +Cc: pgadmin-hackers
Thanks - patch applied.
On Tue, May 16, 2017 at 4:43 PM, Murtuza Zabuawala <
[email protected]> wrote:
> Hi,
>
> PFA minor patch to fix the in server stats sql where it was fails to
> execute because it is not able to concat inet (type) when using with ||
> operator.
>
> *Fails:*
> select client_addr || ':' || client_port from pg_stat_activity
>
> *Works:*
> select client_addr::text || ':' || client_port from pg_stat_activity
>
> Fixes RM#1831
>
> --
> Regards,
> Murtuza Zabuawala
> EnterpriseDB: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>
>
> --
> Sent via pgadmin-hackers mailing list ([email protected])
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgadmin-hackers
>
>
--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake
EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2017-05-17 14:53 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2017-05-16 15:43 [pgAdmin4][PATCH] To fix the issue in server stats sql (PPAS9.2) Murtuza Zabuawala <[email protected]>
2017-05-17 14:53 ` Dave Page <[email protected]>
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox