Odd Invalid type name error in postgresql 9.1

Поиск
Список
Период
Сортировка
От Jim Wilson
Тема Odd Invalid type name error in postgresql 9.1
Дата
Msg-id CALM6-3ewZOr8f+xMpq2ShSkhzWnoRWsAfRdyN46F9GVn2Jm4KQ@mail.gmail.com
обсуждение исходный текст
Ответы Re: Odd Invalid type name error in postgresql 9.1  (Adrian Klaver <adrian.klaver@gmail.com>)
Re: Odd Invalid type name error in postgresql 9.1  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
Hi,

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.

Loading the server from a dump-all at the time of the upgrade went
fine and the function was loaded along with all the other database
objects. I noticed later on that at runtime (e.g. calling the
function) I was receiving an "invalid type name" error on the
declaration using "detail%rowtype".

This seemed odd. I couldn't find any record of "detail" being a
reserved word, and the usual sql queries using the table perform
without a hitch. But when I changed the declaration in the function to
have quotes around the table name (e.g. "detail"%rowtype) the error
went away.

Any ideas on this? My biggest concern is if there is a structural
problem in the database that might result in a crash later, I'd like
to get it fixed now.

Thanks in advance,

Jim Wilson


В списке pgsql-general по дате отправления:

Предыдущее
От: Adrian Klaver
Дата:
Сообщение: Re: trigger and plpgsq help needed
Следующее
От: Shaun Thomas
Дата:
Сообщение: Re: [PERFORM] Inaccurate Explain Cost