N
N
Nikita Vereshchagin2020-08-17 17:08:45
PostgreSQL
Nikita Vereshchagin, 2020-08-17 17:08:45

PostgreSQL trigger functions. How to make a function that creates a table whose name is equal to the value of the cell in the table to which the trigger is attached?

It is necessary to make base in which at creation of the user the table is created to it. The table needs to be identified somehow, so I decided to name the tables the same as the user's key. There are no questions about creating a trigger, but there are questions about the function. I'm not even close to how to do it. I'm already thinking about just adding records like "USER KEY - VALUE" in one additional table, but I'm not sure that this way the search will work faster.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question