Giampaolo Capelli <giam...@gmail.com> writes:
> The function relation_open returns a non NULL pointer in my extension, but
> then the last line in the following snippet crashes postgres.

> Relation rel;
> rel = relation_open(relid, AccessShareLock);

> Assert(rel != NULL);
> Assert(rel->rd_rel != NULL);
> Assert(rel->rd_id != NULL);
> elog(INFO, "rel->rd_id not null");
> Oid rd_id = rel->rd_id;

Hmm, I'm a little bit doubting your statement that relation_open
succeeded.  I wonder if maybe you built your extension without asserts
enabled ...

                        regards, tom lane


Reply via email to