| От | Stephan Szabo |
|---|---|
| Тема | Re: Problem with inserting into a triggerable table; |
| Дата | |
| Msg-id | 20040326145352.M77876@megazone.bigpanda.com обсуждение |
| Ответ на | Problem with inserting into a triggerable table; (Anoop Rajendra <axr3845@omega.uta.edu>) |
| Список | pgsql-general |
On Thu, 25 Mar 2004, Anoop Rajendra wrote: > Hi, I was having some problems with inserting into a table with a trigger > function attached. > > My code is shown below - > CREATE OR REPLACE FUNCTION update_tv_prefs() RETURNS trigger AS ' > BEGIN > SELECT * FROM tvprefs WHERE ch_number = NEW.id AND time_of_day = > get_time() as X; This "as X" is invalid I believe. > Here, I dont have problems creating either the trigger or the function. > Nor did I have any problems with the language before. I wrote another > function with pretty much the same syntax ( not a trigger function though) > and I didnt get any errors. > But when I try to insert into the TV table, I get a error telling me - > > ERROR: syntax error at or near "as" at character 76 > CONTEXT: PL/pgSQL function "update_tv_prefs" line 2 at SQL statement
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера