Timeline for trigger can't access column loop
Current License: CC BY-SA 3.0
10 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Sep 17, 2014 at 10:39 | vote | accept | Marcus Junius Brutus | ||
Sep 16, 2014 at 22:30 | history | edited | Erwin Brandstetter |
edited tags
|
|
Sep 16, 2014 at 22:28 | answer | added | Erwin Brandstetter | timeline score: 3 | |
Sep 16, 2014 at 22:14 | comment | added | Erwin Brandstetter | @ypercube: It's "plpgsql" or "PL/pgSQL". The link you quote just lists SQL keywords. I don't know of a comprehensive list for plpgsql. BTW, the situation in Postgres 9.3 is unchanged: sqlfiddle.com/#!15/857f3/1 . I did not see any news on this for 9.4 either. I really think this needs some attention ... | |
Sep 16, 2014 at 22:03 | comment | added | ypercubeᵀᴹ |
@ErwinBrandstetter Have you got a link with pgSQL keywords? Because LOOP is not in postgresql.org/docs/current/static/sql-keywords-appendix.html
|
|
Sep 16, 2014 at 22:00 | comment | added | Erwin Brandstetter |
@ypercube: I don't think that's how it should be, since the column name is table qualified (NEW.loop ) and should be unambiguous that way, but obviously the parser is confused if the keyword loop is used as unquoted identifier. That aside, it's generally a bad idea to use key words as identifiers ...
|
|
Sep 16, 2014 at 21:55 | comment | added | ypercubeᵀᴹ |
@ErwinBrandstetter That works. But why? Is loop reserved in pg/SQL?
|
|
Sep 16, 2014 at 21:55 | comment | added | Marcus Junius Brutus |
@ErwinBrandstetter I confirm that when loop is quoted in the plpgsql code, it works.
|
|
Sep 16, 2014 at 21:52 | comment | added | Erwin Brandstetter |
Have you tried the same with quoting the reserved word loop inside plpgsql? In lower case: "loop" .
|
|
Sep 16, 2014 at 21:38 | history | asked | Marcus Junius Brutus | CC BY-SA 3.0 |