0
I’m having a problem with the following, I need to create a Rigger that when a given row is inserted it creates a SCHEMA with a specific structure! For example, in the public scheme, I have the client table, and when I insert some client, I need to create a Trigger with the client’s name.
INSERT INTO public.cliente (idcliente, nome) VALUES (2,'joao');
In that case, he would automatically create a SCHEMA with the name of John, but I have no idea how to do that.
I need to create a function that takes the SCHEMA name as parameter and within this function create the SCHEMA?
What a strange thing, huh? This looks like something very wrong.
– Maniero
What is the purpose of creating a new schema for each record?
– rray
In fact, is that each user of a given system will have its own SCHEMA, it was not I who created this rule and if it were for me I would not do so too.
– Bruno Nascimento