show application_name

From: Luiz Eduardo <dudulond(at)gmail(dot)com>
To: pgadmin-support(at)postgresql(dot)org
Subject: show application_name
Date: 2012-04-17 20:23:36
Message-ID: 1334694216767-5647490.post@n5.nabble.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-support

Olá pessoal,
gostaria de saber como é possível saber o nome da aplicação que está rodando
através da query do postgreSQL
Estou criado uma função em PL/SQL da seguinte forma:

CREATE OR REPLACE FUNCTION audit()
RETURNS trigger AS
$BODY$
declare
sApplication text;
begin
execute 'show application_name' into sApplication;
end;
$BODY$

LANGUAGE plpgsql VOLATILE
COST 100;
ALTER FUNCTION audit() OWNER TO solution;

O objetivo é saber se a alteração de um registro foi feito pelo sistema ou
diretamente no postgreSQL

obrigado desde já
att,
Luiz Eduardo A. Londero

--
View this message in context: http://postgresql.1045698.n5.nabble.com/show-application-name-tp5647490p5647490.html
Sent from the PostgreSQL - pgadmin support mailing list archive at Nabble.com.

Responses

Browse pgadmin-support by date

  From Date Subject
Next Message Guillaume Lelarge 2012-04-17 21:39:37 Re: Bug: Foreign Data Table DDL SQL is mangled
Previous Message Guillaume Lelarge 2012-04-16 21:59:58 Re: Feature Request: No gui for creating user mappings