How to get Relation tuples in C function

From: Patrick Handja <patrick(dot)bungama(at)gmail(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: How to get Relation tuples in C function
Date: 2021-02-13 19:54:39
Message-ID: CAOKRWVBC-5B+mGATyMTzKo-aY9hNNvLw6G1Ntgu3bkBWDt_DeA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Greetings!

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.13.11. But it is
not quite clear enough on how to retrieve tuples. The handling of these is
quite clear. The only function I'm currently using (but not working) is the
TupleDesc TypeGetTupleDesc (Oid typeoid, List * colaliases) function. Do we
have a function like TupleDesc RelationNameGetTupleDesc (const char *
relname) (Old and deprecated)?

regards,

*Andjasubu Bungama, Patrick *

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Ranier Vilela 2021-02-13 20:35:05 Re: Possible dereference null return (src/backend/replication/logical/reorderbuffer.c)
Previous Message Tom Lane 2021-02-13 17:35:45 Re: Some regular-expression performance hacking