Assignments in PL/pgSQL

Поиск
Список
Период
Сортировка
От Michael Paesold
Тема Assignments in PL/pgSQL
Дата
Msg-id 007301c25b12$5b8d96e0$4201a8c0@beeblebrox
обсуждение исходный текст
Ответ на Re: DISTINCT ON  ("Christopher Kings-Lynne" <chriskl@familyhealth.com.au>)
Ответы Re: Assignments in PL/pgSQL
Список pgsql-sql
Hi all,

although this is not really SQL, but PL/pgSQL, I hope this is the right
place to ask.

I have written a complex triggers. It works very well. Just now I have
realized that I have used the = operater for variable assignments, instead
of the := operater. To my suprise, there was no error or warning, and the
store procedure works very well!

e.g.
NEW.someval = rec.someother;
works as well as
NEW.someval := rec.someother;

Can you confirm that both are valid? Can someone explain this?
And is it safe to use the former syntax?

Best Regards,
Michael Paesold





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

Предыдущее
От: "Albrecht Berger"
Дата:
Сообщение: Re: sql group by statement
Следующее
От: Hanno Wiegard
Дата:
Сообщение: Table alias in DELETE statements