Parallel safety of CURRENT_* family
От | |
---|---|
Тема | Parallel safety of CURRENT_* family |
Дата | |
Msg-id | 937ac7744dee7956324d43149b821538e357@guerrillamail.com обсуждение исходный текст |
Ответы |
Re: Parallel safety of CURRENT_* family
|
Список | pgsql-hackers |
Hello How should I mark a function which calls CURRENT_DATE? Parallel safe or parallel restricted? pg_proc shows that now() is marked as restricted, but transaction_timestamp() is marked as safe. The manual (https://www.postgresql.org/docs/9.6/static/functions-datetime.html) says that "now() is a traditional PostgreSQLequivalent to transaction_timestamp()" and "transaction_timestamp() is equivalent to CURRENT_TIMESTAMP". The code seems to confirm: GetSQLCurrentDate(), GetSQLCurrentTimestamp() and now() all invoke the same GetCurrentTransactionStartTimestamp(). It looks like that functions which uses the CURRENT_* family of functions should be marked as restricted (something to addto the docs) and that transaction_timestamp() is incorrectly marked as safe. Am I wrong? Mark Kolar ---- Sent using Guerrillamail.com Block or report abuse: https://www.guerrillamail.com/abuse/?a=UUZnFAFNS7UWgwum414PfQfTStiVwcZciatQew%3D%3D
В списке pgsql-hackers по дате отправления: