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:38:27
Message-ID: 542D7173.7000004@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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2014-10-02 16:13:33 Re: Getting my Database name in a C Extension
Previous Message Cedric Berger 2014-10-02 15:11:32 Getting my Database name in a C Extension