Database Oid from SPI

From: Markus Schiltknecht <markus(at)bluegap(dot)ch>
To: pgsql-general(at)postgresql(dot)org
Subject: Database Oid from SPI
Date: 2006-07-27 12:17:59
Message-ID: eaaahj$1bcf$1@news.hub.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Markus Schiltknecht 2006-07-27 12:22:26 Re: Database Oid from SPI
Previous Message Christian Rengstl 2006-07-27 11:58:20 Shared buffers