Conditional INSERT

Поиск
Список
Период
Сортировка
От basti
Тема Conditional INSERT
Дата
Msg-id 68951fae-3281-c9ad-09b7-205e0bb1c5ae@unix-solution.de
обсуждение исходный текст
Ответы Re: Conditional INSERT
Re: Conditional INSERT
Re: Conditional INSERT
Список pgsql-general
Hello,

I want to insert data into table only if condition is true.
For example:

INSERT into  mytable (domainid, hostname, txtdata)
  VALUES (100,'_acme.challenge.example', 'somedata');

The insert should only be done if Hostname like %_acme.challenge%.

How can it be done? I dont want that the user/script can insert any value.

Best regards.


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