I'm writing a custom C function and one of the things it needs to do is to be configured from the SQL-land, per user session (different users have different configurations in different sessions). I have found (and have used) the SET SESSION command and the current_setting() function for use with custom_variable_classes configuration in postgresql.conf, but I'm not sure how to achieve the same effect from C. Ideally, the C module would create its own "custom variable class," named e.g. "module", then define some setting, e.g. "module.setting". The users would then execute an SQL command such as "SET SESSION module.setting='something'", and the module would need to pick this up in the C function. Any pointers to how this would be done?
Attachment:
signature.asc
Description: OpenPGP digital signature