Unix Technical Forum

accessing postgres conf from stored procedure

This is a discussion on accessing postgres conf from stored procedure within the pgsql Hackers forums, part of the PostgreSQL category; --> Is it possible to access postgres configuration from a C stored procedure ? I need to leverage memory usage ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > pgsql Hackers

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-11-2008, 04:35 AM
strk
 
Posts: n/a
Default accessing postgres conf from stored procedure

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

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-11-2008, 04:36 AM
Dave Cramer
 
Posts: n/a
Default Re: accessing postgres conf from stored procedure

you can use show xxx to show configuration values

http://www.postgresql.org/docs/7.4/i.../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
>
>



---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to majordomo@postgresql.org)

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 04-11-2008, 04:36 AM
strk
 
Posts: n/a
Default Re: accessing postgres conf from stored procedure

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/i.../sql-show.html


No direct interface for shared libs ?

--strk;

---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@postgresql.org so that your
message can get through to the mailing list cleanly

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 04-11-2008, 04:36 AM
Michael Fuhr
 
Posts: n/a
Default Re: accessing postgres conf from stored procedure

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/i.../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/

---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
choose an index scan if your joining column's datatypes do not
match

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 09:44 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
www.UnixAdminTalk.com