Lists: | pgsql-hackers |
---|
From: | strk <strk(at)keybit(dot)net> |
---|---|
To: | pgsql-hackers(at)postgresql(dot)org |
Subject: | accessing postgres conf from stored procedure |
Date: | 2005-06-27 10:56:21 |
Message-ID: | 20050627105621.GA45726@keybit.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
Is it possible to access postgres configuration from
a C stored procedure ?
I need to leverage memory usage and I'd use postgres configuration
rather then a compile-time define.
Is there such a configuration, if access is possible ?
--strk;
From: | Dave Cramer <pg(at)fastcrypt(dot)com> |
---|---|
To: | strk <strk(at)keybit(dot)net> |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: accessing postgres conf from stored procedure |
Date: | 2005-06-27 12:55:50 |
Message-ID: | 587D176F-F87C-4345-B00E-6B20ED8A06B6@fastcrypt.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
you can use show xxx to show configuration values
http://www.postgresql.org/docs/7.4/interactive/sql-show.html
Dave
On 27-Jun-05, at 6:56 AM, strk wrote:
> Is it possible to access postgres configuration from
> a C stored procedure ?
>
> I need to leverage memory usage and I'd use postgres configuration
> rather then a compile-time define.
>
> Is there such a configuration, if access is possible ?
>
> --strk;
>
> ---------------------------(end of
> broadcast)---------------------------
> TIP 8: explain analyze is your friend
>
>
From: | strk <strk(at)keybit(dot)net> |
---|---|
To: | Dave Cramer <pg(at)fastcrypt(dot)com> |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: accessing postgres conf from stored procedure |
Date: | 2005-06-27 14:37:11 |
Message-ID: | 20050627143711.GA47523@keybit.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
On Mon, Jun 27, 2005 at 08:55:50AM -0400, Dave Cramer wrote:
> you can use show xxx to show configuration values
>
> http://www.postgresql.org/docs/7.4/interactive/sql-show.html
No direct interface for shared libs ?
--strk;
From: | Michael Fuhr <mike(at)fuhr(dot)org> |
---|---|
To: | Dave Cramer <pg(at)fastcrypt(dot)com>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: accessing postgres conf from stored procedure |
Date: | 2005-06-27 14:52:58 |
Message-ID: | 20050627145258.GA95400@winnie.fuhr.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
On Mon, Jun 27, 2005 at 04:37:11PM +0200, strk wrote:
> On Mon, Jun 27, 2005 at 08:55:50AM -0400, Dave Cramer wrote:
> > you can use show xxx to show configuration values
> >
> > http://www.postgresql.org/docs/7.4/interactive/sql-show.html
>
> No direct interface for shared libs ?
I don't know if it's fair game, but GetConfigOptionByName() (declared
in utils/guc.h) appears to work. Can any of the developers comment
on whether it's appropriate for user-defined code to call this
function?
--
Michael Fuhr
http://www.fuhr.org/~mfuhr/