Re: ERROR: fmgr_info: function 24809: cache lookup

Поиск
Список
Период
Сортировка
От Oliver Elphick
Тема Re: ERROR: fmgr_info: function 24809: cache lookup
Дата
Msg-id 1040128731.3118.95.camel@linda.lfix.co.uk
обсуждение исходный текст
Ответ на ERROR: fmgr_info: function 24809: cache lookup failed  (Jessica Blank <jb@twu.net>)
Ответы Re: ERROR: fmgr_info: function 24809: cache lookup failed  (Jessica Blank <jb@twu.net>)
Список pgsql-general
On Tue, 2002-12-17 at 13:03, Jessica Blank wrote:
> Hi all. I feel awfully stupid.
>
> Migrating my skillset from Oracle to Postgres, I am trying (in vain) to
> create a trigger and a sequence to "auto increment" the primary key in a
> table, so I won't have to worry about setting it; each time you INSERT
> into the table, the primary key will be automagically assigned.

As Jessica said, use the SERIAL type, which will automatically increment
the sequence and use its value unless an explicit value is given for the
column.

> And when I try to INSERT into SENTENCES, without my SENTENCEID, hoping
> that the function/trigger/sequence will kick in and assign it for me...
>
>    architxts=# INSERT INTO SENTENCES (CHAPTERID, SOFFSET) VALUES (123, 147);
>    ERROR:  fmgr_info: function 24809: cache lookup failed

This probably means that you have dropped and recreated the function
after you created the trigger.  The trigger is still looking for the old
function, but it has been deleted.  To avoid such problems, use CREATE
OR REPLACE FUNCTION ...  If you haven't got that syntax available, you
need to update PostgreSQL.

--
Oliver Elphick                                Oliver.Elphick@lfix.co.uk
Isle of Wight, UK                             http://www.lfix.co.uk/oliver
GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839  932A 614D 4C34 3E1D 0C1C
                 ========================================
     "For I say, through the grace given unto me, to every
      man that is among you: Do not think of yourself more
      highly than you ought, but rather think of yourself
      with sober judgement, in accordance with the measure
      of faith God has given you."            Romans 12:3


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

Предыдущее
От: "Prachi Jain"
Дата:
Сообщение: Using Image datatype in Postgres
Следующее
От: Thomas Beutin
Дата:
Сообщение: Re: INDEX suggestion needed