Hi Guys,
sorry for my late answer. I tested this today and working like a charm!
You are brilliant ! thank you, saved my ass!
Best,
Jacek
śr., 11 lip 2018 o 10:30 Ken Tanzer napisał(a):
>
>
> On Tue, Jul 10, 2018 at 5:45 PM Adrian Klaver
> wrote:
>
>> select add_trigger('trg_test');
>>
>> te
On Tue, Jul 10, 2018 at 5:45 PM Adrian Klaver
wrote:
> select add_trigger('trg_test');
>
> test=> \d trg_test
>
> Table "public.trg_test"
>
>
> Column | Type| Collation | Nullable | Default
>
>
> +---+---+--+-
>
>
On 07/10/2018 02:30 AM, Łukasz Jarych wrote:
Maybe yes,
but for me when i am learning it is not...
The example function. It is a minimal example but it should serve as a
starting point.:
CREATE OR REPLACE FUNCTION public.add_trigger(tbl_name character varying)
RETURNS void
LANGUAGE plpgsq
On 07/10/2018 02:30 AM, Łukasz Jarych wrote:
Maybe yes,
but for me when i am learning it is not...
How do you do CREATE TABLE now, ad hoc in the client or via scripts?
If via scripts you could create a template script for the trigger and
then just fill in the table name as needed.
A functi
Łukasz Jarych schrieb am 09.07.2018 um 13:03:
> i have small database and i am tracking changes using trigger:
>
> CREATE TRIGGER t BEFORE INSERT OR UPDATE OR DELETE ON t_trig
>
> FOR EACH ROW EXECUTE PROCEDURE change_trigger();
>
> It is possible to create general trigger for all tables
Maybe yes,
but for me when i am learning it is not...
Best,
Jacek
wt., 10 lip 2018 o 11:29 Guillaume Lelarge
napisał(a):
> 2018-07-10 11:28 GMT+02:00 Łukasz Jarych :
>
>> Thank you very much Guillaume.
>>
>> Do you know maybe any function to do it automatically?
>>
>>
> Nope, but it should be
2018-07-10 11:28 GMT+02:00 Łukasz Jarych :
> Thank you very much Guillaume.
>
> Do you know maybe any function to do it automatically?
>
>
Nope, but it should be easy to write a shell script or a DO script to do it.
Best,
> Jacek
>
> wt., 10 lip 2018 o 11:25 Guillaume Lelarge
> napisał(a):
>
>>
Thank you very much Guillaume.
Do you know maybe any function to do it automatically?
Best,
Jacek
wt., 10 lip 2018 o 11:25 Guillaume Lelarge
napisał(a):
> 2018-07-10 10:56 GMT+02:00 Łukasz Jarych :
>
>> No possible?
>>
>>
> Nope, you need to set up the trigger on each table.
>
> Jacek
>>
>> p
2018-07-10 10:56 GMT+02:00 Łukasz Jarych :
> No possible?
>
>
Nope, you need to set up the trigger on each table.
Jacek
>
> pon., 9 lip 2018 o 13:03 Łukasz Jarych napisał(a):
>
>> Hi,
>>
>> i have small database and i am tracking changes using trigger:
>>
>> CREATE TRIGGER t BEFORE INSERT OR UPD
No possible?
Jacek
pon., 9 lip 2018 o 13:03 Łukasz Jarych napisał(a):
> Hi,
>
> i have small database and i am tracking changes using trigger:
>
> CREATE TRIGGER t BEFORE INSERT OR UPDATE OR DELETE ON t_trig
>
> FOR EACH ROW EXECUTE PROCEDURE change_trigger();
>
> It is possible to crea
Hi,
i have small database and i am tracking changes using trigger:
CREATE TRIGGER t BEFORE INSERT OR UPDATE OR DELETE ON t_trig
FOR EACH ROW EXECUTE PROCEDURE change_trigger();
It is possible to create general trigger for all tables?
Like event trigger?
It would be very helpful for me.
11 matches
Mail list logo