[GENERAL] Modify standard PG type casts?

2010-04-08 Thread Łukasz Dejneka
Hi all Is it possible to modify a type cast which is a standard cast in Postgres? I need to modify the ::TSQuery type cast, so it points to my own function. I would preffer not to create additional custom user cast. Manual only mentions about creating and dropping custom user casts via SQL comman

Re: [GENERAL] Internal PG functions, how to pass proper parameters?

2010-04-07 Thread Łukasz Dejneka
2010/4/7 Martijn van Oosterhout : > This may be silly, but did you declare your function to be a V1 > function? Yes, it is properly declared V1 function. The parameter is a pointer so as I understand the concept it is used to access some other processed data than the function result. But still ca

[GENERAL] Internal PG functions, how to pass proper parameters?

2010-04-07 Thread Łukasz Dejneka
Hi all I need a bit assistance. In  ../src/backend/utils/adt/tsginidx.c there is a function called gin_extract_tsquery. It recieves 5 parameters and I would like to execute it from C code using my own function. The gin_extract_tsquery relevant part: Datum gin_extract_tsquery(PG_FUNCTION_ARGS) {