Re: create a procedure based on column data change in postgrersql

Поиск
Список
Период
Сортировка
От David G. Johnston
Тема Re: create a procedure based on column data change in postgrersql
Дата
Msg-id CAKFQuwbYdEkhW3KT19-WC6D1=QY-6=UEZU0MgMT8TV7RyVRLSg@mail.gmail.com
обсуждение исходный текст
Ответ на create a procedure based on column data change in postgrersql  (Jian He <hejian.mark@gmail.com>)
Список pgsql-sql
On Tue, Oct 19, 2021 at 6:46 AM Jian He <hejian.mark@gmail.com> wrote:

This is very useful and interesting.  I can see it's very useful. I am not sure if it's costly or not? 

when I update then error occurs. the update clause didn't execute. the function did fired. 
NOTICE: hello world
ERROR: control reached end of trigger procedure without RETURN
CONTEXT: PL/pgSQL function notify_insert_account_details()
______________________________________________
I am wondering how sophisticated this procedure/function notify_insert_account_details() can become, let's say linked within 3 table.
Can anyone showcase an example/demo?

I also asked same question on stackoverflow. Since it's more easy to search. (https://stackoverflow.com/questions/69631945/create-a-procedure-based-on-column-data-change-in-postgrersql),


When you discover some new feature that you've never seen before on StackOverflow (or elsewhere) I suggest you take some time to read the documentation, which often contains examples.

In this case you seem to have discovered:
user-defined functions
pl/pgsql language functions
triggers

There is lots of excellent material and examples on how these things all work in the documentation.

David J.

В списке pgsql-sql по дате отправления:

Предыдущее
От: Jian He
Дата:
Сообщение: create a procedure based on column data change in postgrersql
Следующее
От: aditya desai
Дата:
Сообщение: Convert text to user defined datatype