| От | Michael Fuhr |
|---|---|
| Тема | Re: Basic problems using plpythonu - bug? |
| Дата | |
| Msg-id | 20060217175732.GA45419@winnie.fuhr.org обсуждение исходный текст |
| Ответ на | Basic problems using plpythonu - bug? ("Curt Schwaderer" <curt.schwaderer@mchsi.com>) |
| Список | pgsql-general |
On Fri, Feb 17, 2006 at 11:38:21AM -0600, Curt Schwaderer wrote: > ERROR: plppython: function "send_ctl_msg" failed > DETAIL: exceptions.KeyError: 'cfgCmd' You're getting bit by case folding of identifiers. You created the column as: > cfgCmd VARCHAR(16), -- ENS configuration control command Since you didn't quote the identifier it's folded to lowercase, so when you refer to it as > ens_cmd = rv[0]["cfgCmd"] you get a KeyError exception. Try using rv[0]["cfgcmd"]. You might want to read the documentation about quoted identifiers: http://www.postgresql.org/docs/8.1/interactive/sql-syntax.html#SQL-SYNTAX-IDENTIFIERS -- Michael Fuhr
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера