Search Postgresql Archives

How to tell which statement is being executed

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi All,

 

If I create a C function, is there a way from within that function for me to:

 

  1. know whether it is being triggered by an INSERT or UPDATE statement
    1. I’ve done some digging and it seems you can get this information if you provide a Planner hook, however, I need to know this much later in my function not in the Planner
    2. Is there some way for me to get to the PlannedStmt (or anything else that may have the command type) from within my function?
  2. column attribute (specifically the TYPMOD) for the affected column

 

BTW, is there a more appropriate Postgres list/group/blog that is specifically dedicated to these types of programming questions or is it ok to post this here?

 

Regards,

Garfield


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux