How to create trigger to restrict operators CREATE at night time?

There is a need to create a trigger to limit the execution of the operator a CREATE at night. I understand how to record the condition "night-time", but I don't know how to impose restrictions on the execution of the operators CREATE.
The syntax for defining triggers is not possible to choose the SQL CREATE event (by the way, I also need the operator itself, not the event).
March 19th 20 at 09:19
1 answer
March 19th 20 at 09:21
Solution
You with some very not the side you want to approach the problem. The question which we must look for an answer to why you want it?

In normal view you have no such problem at the level of rights - DDL is forbidden for user applications. And for the people - is not solved by technical means and organizational. That is, to prod at any time of the day no access to the schema change people (and actually read by people, too, for people access not combat the remark), are not responsible for the consequences of their actions. But experts who have access should be to obstruct strangely, though the day, though, especially at night (when things are critical and you can roll out).

However, event triggers can be ddl_command_start for a number of create commands.
I agree with restricting access to products in real life.
It's just part of homework that I don't know how to do :)
But the event triggers - what you need. Thank you! - burnice80 commented on March 19th 20 at 09:24

Find more questions by tags Database administrationPostgreSQL