Search Postgresql Archives

Re: Basic problems using plpythonu - bug?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Thanks a bunch - that cleaned everything up!

Curt

----- Original Message ----- From: "Michael Fuhr" <mike@xxxxxxxx>
To: "Curt Schwaderer" <curt.schwaderer@xxxxxxxxx>
Cc: <pgsql-general@xxxxxxxxxxxxxx>
Sent: Friday, February 17, 2006 11:57 AM
Subject: Re: [GENERAL] Basic problems using plpythonu - bug?


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



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux