Getting my Database name in a C Extension - Mailing list pgsql-general

From Cedric Berger
Subject Getting my Database name in a C Extension
Date
Msg-id 542D7173.7000004@precidata.com
Whole thread Raw
Responses Re: Getting my Database name in a C Extension  (Tom Lane <tgl@sss.pgh.pa.us>)
List 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



pgsql-general by date:

Previous
From: Adam Brusselback
Date:
Subject: Re: table versioning approach (not auditing)
Next
From: Tom Lane
Date:
Subject: Re: Getting my Database name in a C Extension