Re: How to get Relation tuples in C function

2021-02-16 Thread Andy Fan
On Sun, Feb 14, 2021 at 7:56 PM Michael Paquier wrote: > On Sun, Feb 14, 2021 at 09:29:08AM +0800, Andy Fan wrote: > > Thank you tom for the reply. What would be the difference between the > > SPI and "write a pure SQL UDF" and call it with DirectFunctionCall1? I > > just ran into a similar situ

Re: How to get Relation tuples in C function

2021-02-14 Thread Michael Paquier
On Sun, Feb 14, 2021 at 09:29:08AM +0800, Andy Fan wrote: > Thank you tom for the reply. What would be the difference between the > SPI and "write a pure SQL UDF" and call it with DirectFunctionCall1? I > just ran into a similar situation some days before. Currently I think > DirectFunctionCall1

Re: How to get Relation tuples in C function

2021-02-13 Thread Andy Fan
On Sun, Feb 14, 2021 at 5:23 AM Tom Lane wrote: > Patrick Handja writes: > > I would like to know if there is a better way to pass a relation or if > the > > relation name (CString) as a parameter in a C function and thus be able > to > > manipulate its tuples. The documentation is available her

Re: How to get Relation tuples in C function

2021-02-13 Thread Tom Lane
Patrick Handja writes: > I would like to know if there is a better way to pass a relation or if the > relation name (CString) as a parameter in a C function and thus be able to > manipulate its tuples. The documentation is available here: > https://www.postgresql.org/docs/13/xfunc-c.html#id-1.8.3.