Re: Relation 0 does not exist

From: Patrick Welche <prlw1(at)newn(dot)cam(dot)ac(dot)uk>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Relation 0 does not exist
Date: 2002-09-25 22:13:16
Message-ID: 20020925231316.B10728@quartz.newn.cam.ac.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

On Wed, Sep 25, 2002 at 05:49:17PM -0400, Tom Lane wrote:
> Patrick Welche <prlw1(at)newn(dot)cam(dot)ac(dot)uk> writes:
> > One thing which bugs me: I have a currval in there, and that is the very
> > first query which reaches the database, so it won't be "set", will it, but
> > then, how could it have worked for months with the other version of server?
>
> Good question. Do you have any ON INSERT rules on that table?

No

> Could you try setting a breakpoint at elog() to capture the stack trace
> leading up to the error?

#0 elog (lev=15, fmt=0x821133b "statement: %s") at elog.c:114
#1 0x81812db in elog (lev=20, fmt=0x8196b02 "Relation %u does not exist")
at elog.c:438
#2 0x80791a2 in relation_open (relationId=0, lockmode=2) at heapam.c:474
#3 0x8079329 in heap_open (relationId=0, lockmode=2) at heapam.c:602
#4 0x816d94b in RI_FKey_check (fcinfo=0xbfbfc884) at ri_triggers.c:212
#5 0x816dee1 in RI_FKey_check_ins (fcinfo=0xbfbfc884) at ri_triggers.c:506
#6 0x80d4d2b in ExecCallTriggerFunc (trigdata=0xbfbfc9ac, finfo=0x82dd01c,
per_tuple_context=0x83342d8) at trigger.c:974
#7 0x80d5852 in DeferredTriggerExecute (event=0x833801c, itemno=0,
rel=0x82f5494, finfo=0x82dd01c, per_tuple_context=0x83342d8)
at trigger.c:1497
#8 0x80d5a5f in deferredTriggerInvokeEvents (immediate_only=1 '\001')
at trigger.c:1620
#9 0x80d5c29 in DeferredTriggerEndQuery () at trigger.c:1775
#10 0x8136d57 in finish_xact_command () at postgres.c:894
#11 0x8136c25 in pg_exec_query_string (query_string=0x82d701c, dest=Remote,
parse_context=0x82818ac) at postgres.c:827
#12 0x8137e19 in PostgresMain (argc=6, argv=0xbfbfccb4,
username=0x825f925 "root") at postgres.c:1924
#13 0x811cad2 in DoBackend (port=0x825f800) at postmaster.c:2276
#14 0x811c3f9 in BackendStartup (port=0x825f800) at postmaster.c:1908
#15 0x811b5af in ServerLoop () at postmaster.c:993
#16 0x811b132 in PostmasterMain (argc=4, argv=0x825a040) at postmaster.c:774
#17 0x80f4ee5 in main (argc=4, argv=0xbfbfd4c0) at main.c:209
#18 0x8069880 in ___start ()

The definition of trans had:
Triggers: RI_ConstraintTrigger_14413070,
RI_ConstraintTrigger_14413073

I was inserting meter_id=411, stats_id=currval('stats_id_seq')
meter.id=411 exists. Hard to tell about the other one.. Still don't see
why this ever worked..

Cheers,

Patrick

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2002-09-25 22:26:22 Re: Relation 0 does not exist
Previous Message Patrick Welche 2002-09-25 21:56:44 Re: "lo" large object

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2002-09-25 22:18:20 Re: compiling client utils under win32 - current 7.3devel is broken
Previous Message Tom Lane 2002-09-25 22:11:29 Re: CVS checkout errors