Re: Odd Invalid type name error in postgresql 9.1

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Jim Wilson <jimw(at)kelcomaine(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Odd Invalid type name error in postgresql 9.1
Date: 2012-09-27 00:48:53
Message-ID: 9884.1348706933@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Jim Wilson <jimw(at)kelcomaine(dot)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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message joao viegas 2012-09-27 00:56:00 function return value inside a trigger function
Previous Message Chris Curvey 2012-09-27 00:42:51 unc paths, like and backslashes on 8.4