Re: Trigger Procedure Error: NEW used in query that is not in a rule
В списке pgsql-general по дате отправления:
| От | Lew |
|---|---|
| Тема | Re: Trigger Procedure Error: NEW used in query that is not in a rule |
| Дата | |
| Msg-id | 4t6dnWfG99WKbSPbnZ2dnUVZ_hadnZ2d@comcast.com обсуждение исходный текст |
| Ответ на | Trigger Procedure Error: NEW used in query that is not in a rule ("Javier Fonseca V." <fonsecajavier@gmail.com>) |
| Список | pgsql-general |
Javier Fonseca V. wrote: > Hello. > > I'm doing a Trigger Procedure in pl/pgSQL. It makes some kind of auditing. > > I think that it's working alright except for the next line: > > EXECUTE 'INSERT INTO ' || quote_ident(somedynamictablename) || ' SELECT > new.*'; > > PostgreSQL keeps telling me: "ERROR: NEW used in query that is not in a > rule". I think that this NEW problem is because of the scope of the > EXECUTE statement (outside the scope of the trigger), so it doesn't > recognize the NEW record. > > Maybe I could fix it concatenating column names and the 'new' values but > I want to do my trigger as flexible as possible (I have several tables > to audit). > > Somebody has any suggestion? You got some suggestions in response to your multipost of this question in pgsql.sql. -- Lew
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера