Thank you all for your responses to help me out.
The below code worked for me... pasting it here (May be helpful for someone)
Relation heap;
> ItemPointer ht_ctid;
> heap = heap_open(50620, AccessShareLock); /* 50620 - Table/Relation Oid -
> Hardcoded for better understanding */
ScanKeyInit(&ske
Michael Paquier writes:
> On Tue, May 2, 2017 at 6:12 PM, Mahi Gurram wrote:
>> Please suggest me the easiest way to lookup into PK's B-Tree index for
>> getting TIDs.
> Why don't you just use SPI within your extension? No need to copy the
> logic for btree lookups this way.
There's not actuall
On 2 May 2017 7:34 pm, "Michael Paquier" wrote:
On Tue, May 2, 2017 at 6:12 PM, Mahi Gurram wrote:
> I'm building some custom extension on top of postgres 9.6.1. As part of
> that, I would like to read Heap Tuple directly from my extension using
> Primary Key.
>
> By default, postgres table inde
On Tue, May 2, 2017 at 6:12 PM, Mahi Gurram wrote:
> I'm building some custom extension on top of postgres 9.6.1. As part of
> that, I would like to read Heap Tuple directly from my extension using
> Primary Key.
>
> By default, postgres table index(B-Tree) its PrimaryKey(PK). So, i would
> like t
Hi,
I'm building some custom extension on top of postgres 9.6.1. As part of
that, I would like to read Heap Tuple directly from my extension using
Primary Key.
By default, postgres table index(B-Tree) its PrimaryKey(PK). So, i would
like to get TID by doing a lookup into PK's B-Tree index. Using