Database Oid from SPI - Mailing list pgsql-general

From Markus Schiltknecht
Subject Database Oid from SPI
Date
Msg-id eaaahj$1bcf$1@news.hub.org
Whole thread Raw
Responses Re: Database Oid from SPI  (Markus Schiltknecht <markus@bluegap.ch>)
List pgsql-general
Hi,

how can I get the database name or OID of the current backend in a SPI
function (in plain C)? I tried including storage/proc.h and accessing
MyProc->databaseId, but that leads to a segfault :-(  (and seems like
the wrong way to do it.)

The SPI documentation didn't help.

Thank you

Markus

pgsql-general by date:

Previous
From: "Christian Rengstl"
Date:
Subject: Shared buffers
Next
From: Markus Schiltknecht
Date:
Subject: Re: Database Oid from SPI