Getting my Database name in a C Extension

From: Cedric Berger <cedric(at)precidata(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Getting my Database name in a C Extension
Date: 2014-10-02 15:11:32
Message-ID: 542D6B24.3060109@precidata.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,

I'm writing an extention (FDW), and I need, in my C code, the name of
my database ("contrib_regression_test" for example), and I've two
questions:

1) What is the easiest way to get that directly in C?

2) Is there a way to get this information in the SQL extension
installation/update scripts (like the @/extschema/@ substitution)?

Thanks,

--
Cedric Berger
Precidata Sarl
Maladière 71c
2000 Neuchâtel
cedric(at)precidata(dot)com
032 930 29 62
079 934 11 02

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Cedric Berger 2014-10-02 15:38:27 Getting my Database name in a C Extension
Previous Message Adam Brusselback 2014-10-02 14:38:20 Re: table versioning approach (not auditing)