Re: Error in creating the backend query

From: "Benjamin Krajmalnik" <kraj(at)illumen(dot)com>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "Alvaro Herrera" <alvherre(at)commandprompt(dot)com>, <pgsql-admin(at)postgresql(dot)org>
Subject: Re: Error in creating the backend query
Date: 2009-07-29 23:00:01
Message-ID: F4E6A2751A2823418A21D4A160B689883FCC83@fletch.stackdump.local
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

I wish that were the case.
I am running 8.3.7 built from the FreeBSD ports.
All insertions and updates to that table (or any others) are done
exclusively through that (or other) stored procedures.
We only use ad-hoc queries for selecting data for presentation purposes.
Our code does not cast any column to its type.
Just to make sure that this was indeed the source, we went ahead and
typecast one of the assigned values, and the generated code had a
"double cast", such as

Column = 'value'::VARCHAR::varchar

So the plpgsql stored procedure is definitely the source.
We have worked around this by setting the variable to a blank string if
the value passed to the stored procedure is a null value, but there
definitely appears to be an issue in there.

> -----Original Message-----
> From: Tom Lane [mailto:tgl(at)sss(dot)pgh(dot)pa(dot)us]
> Sent: Wednesday, July 29, 2009 4:43 PM
> To: Benjamin Krajmalnik
> Cc: Alvaro Herrera; pgsql-admin(at)postgresql(dot)org
> Subject: Re: [ADMIN] Error in creating the backend query
>
> "Benjamin Krajmalnik" <kraj(at)illumen(dot)com> writes:
> > Below is the full stored procedure.
>
> All I can do is repeat that plpgsql does not behave that way. It
never
> has AFAIR, and it most definitely doesn't in any version new enough to
> recognize the COST option to CREATE FUNCTION (ie, 8.3 and up). In
> fact,
> I don't believe that commands executed in a plpgsql function will get
> logged at all in 8.3 or later --- they are not according to my tests.
>
> Perhaps you are running some largely hand-hacked local version of
> plpgsql?
> Perhaps you're just confused about what's generating the log entry?
>
> regards, tom lane

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Tom Lane 2009-07-30 00:39:38 Re: Error in creating the backend query
Previous Message Tom Lane 2009-07-29 22:43:18 Re: Error in creating the backend query