Re: [GENERAL] Executing SQL expression from C-functions

2011-01-28 Thread Jorge Arévalo
2011/1/28 Pavel Stehule : > Hello > > see SPI interface > > http://www.postgresql.org/docs/8.4/interactive/spi-examples.html > > Regards > > Pavel Stehule > Hi Pavel, Thanks a lot! Best regards, -- Jorge Arévalo Internet & Mobilty Division, DEIMOS jorge.arev...@deimos-space.com http://mobility.

Re: [GENERAL] Executing SQL expression from C-functions

2011-01-28 Thread Pavel Stehule
Hello see SPI interface http://www.postgresql.org/docs/8.4/interactive/spi-examples.html Regards Pavel Stehule 2011/1/28 Jorge Arévalo : > Hello, > > I need to write a C-function to extend my PostgreSQL server > functionality. One of the arguments of that function is a string > representing an

[GENERAL] Executing SQL expression from C-functions

2011-01-28 Thread Jorge Arévalo
Hello, I need to write a C-function to extend my PostgreSQL server functionality. One of the arguments of that function is a string representing any PostgreSQL valid expression returning a number. For example: 3+5*cos(7.4)/8 7 2+2 log(34) degrees(0.5) power(9.0, 3.0) case when 8 > 2 then 1 when 7