Re: Database Oid from SPI

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

Whoops, sorry, there was another reason for the segfault. Using
MyProc->databaseId works. Is it the right way to do it, though?

Markus Schiltknecht wrote:
> 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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Alvaro Herrera 2006-07-27 12:27:21 Re: Database Oid from SPI
Previous Message Markus Schiltknecht 2006-07-27 12:17:59 Database Oid from SPI