Re: Uso de "implicit cast"

From: Ruben Fitó <r(dot)fito(at)ubiquat(dot)com>
To: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
Cc: Ayuda <pgsql-es-ayuda(at)postgresql(dot)org>
Subject: Re: Uso de "implicit cast"
Date: 2019-08-09 05:24:19
Message-ID: CANiYpQygYuXCbGzRMdUuMaRFaoWdufnUJStcL4jutLvTkxSSQw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-es-ayuda

Gracias Álvaro.

Como dices empezaré por "logguear" estas funciones y los analizaré para ver
dónde hay que meter mano.

Un saludo.

On Thu, 8 Aug 2019 at 18:18, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
wrote:

> Ruben Fitó escribió:
>
> > - Por otro lado, tal y como hemos creado los "implicit cast", según el
> > script:
> >
> > CREATE FUNCTION pg_catalog.text(integer) RETURNS text STRICT IMMUTABLE
> > LANGUAGE SQL AS 'SELECT textin(int4out($1));';
> > CREATE CAST (integer AS text) WITH FUNCTION pg_catalog.text(integer) AS
> > IMPLICIT;
> >
> > - Dicho de otro modo, se crea primero la función y después el cast.
> > Sabéis si puedo monitorizar estas funciones para que me creen un log
> y me
> > indique en qué "SQL" o "lo que sea" se está utilizando?
>
> Claro, puedes modificar la función pg_catalog.text(integer) para que
> mande algo al log: lo más simple es que use lenguaje plpgsql y así
> puedes simplemente agregar un RAISE WARNING/NOTICE o algo parecido. Hay
> otras opciones ...
>
> --
> Álvaro Herrera https://www.2ndQuadrant.com/
> PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
>

--
*Ruben Fitó *
Software Engineer
[image: Ubiquat Technologies, SL]
r(dot)fito(at)ubiquat(dot)com <j(dot)catarineu(at)ubiquat(dot)com>
www.ubiquat.com
Tota la informació continguda en aquest document i arxius adjunts és
CONFIDENCIAL protegida per llei de secret comercial. Si l'ha rebut per
error, si us plau elimini'l i posi's en contacte amb l'emissor.

All information contained in this document and any attachments are
CONFIDENTIAL and protected under trade secret laws. If you receive this
message by mistake, please delete it and notify it immediately to the
sender.

In response to

Browse pgsql-es-ayuda by date

  From Date Subject
Next Message Alvaro Herrera 2019-08-13 21:25:22 pgDay Santiago 2019 -- llamado a charlas y llamado a auspiciadores
Previous Message Ruben Fitó 2019-08-09 05:20:39 Re: PG11: particionado, parallel query y performance