Re: Basic problems using plpythonu - bug?

From: "Curt Schwaderer" <curt(dot)schwaderer(at)mchsi(dot)com>
To: "Michael Fuhr" <mike(at)fuhr(dot)org>
Cc: <pgsql-general(at)postgresql(dot)org>
Subject: Re: Basic problems using plpythonu - bug?
Date: 2006-02-17 19:25:53
Message-ID: 008a01c633f7$f7eab290$67fea8c0@curtf5ff5b67a9
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Thanks a bunch - that cleaned everything up!

Curt

----- Original Message -----
From: "Michael Fuhr" <mike(at)fuhr(dot)org>
To: "Curt Schwaderer" <curt(dot)schwaderer(at)mchsi(dot)com>
Cc: <pgsql-general(at)postgresql(dot)org>
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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2006-02-17 19:51:50 Re: Performance Tuning
Previous Message Darryl W. DeLao Jr. 2006-02-17 19:01:55 Performance Tuning