Re: Odd Invalid type name error in postgresql 9.1 - Mailing list pgsql-general

From Tom Lane
Subject Re: Odd Invalid type name error in postgresql 9.1
Date
Msg-id 9884.1348706933@sss.pgh.pa.us
Whole thread Raw
In response to Odd Invalid type name error in postgresql 9.1  (Jim Wilson <jimw@kelcomaine.com>)
List pgsql-general
Jim Wilson <jimw@kelcomaine.com> writes:
> After upgrading from 8.3 I found an unusual error related to a plpgsql function.

> The database includes a table named "detail".

> The procedure/function in question includes a declaration of detail%rowtype.

Hmm.  The reason that doesn't work is that DETAIL is now a keyword in
plpgsql.  It's supposed to be an unreserved keyword, so ideally this
usage would work; but I see that plpgsql's read_datatype() function
is naive about such cases (in particular, it fails to check for the
%rowtype construct).  I'll see about fixing it, but in the meantime
your best answer is to quote the name.

            regards, tom lane


pgsql-general by date:

Previous
From: Chris Curvey
Date:
Subject: unc paths, like and backslashes on 8.4
Next
From: joao viegas
Date:
Subject: function return value inside a trigger function