Re: [HACKERS] Learning to hack Postgres - Keeping track of ctids

2016-10-03 Thread Robert Haas
On Mon, Oct 3, 2016 at 4:30 PM, Emrul wrote: > I suspect you're right. I've looked at the code and it will be very difficult > (especially if I want to do it as an extension rather than patching > Postgres) and with all the stuff I'd need to do to make it work you're also > right

Re: [HACKERS] Learning to hack Postgres - Keeping track of ctids

2016-10-03 Thread Emrul
I suspect you're right. I've looked at the code and it will be very difficult (especially if I want to do it as an extension rather than patching Postgres) and with all the stuff I'd need to do to make it work you're also right that it probably won't improve upon just using primary key Ids. I've

Re: [HACKERS] Learning to hack Postgres - Keeping track of ctids

2016-10-03 Thread Robert Haas
On Thu, Sep 29, 2016 at 4:15 PM, Emrul wrote: > What I'd like to do is store a reference to all the links from one record > using an array type that stores links to all related tables. > > At first, I've succeeded in doing this using primary key Ids and this works > fine.

Re: [HACKERS] Learning to hack Postgres - Keeping track of ctids

2016-09-30 Thread Craig Ringer
On 30 Sep. 2016 19:36, "Emrul" wrote: > > Thanks Craig, I will look at that code. > > The alternative I'm considering is whether I can define my own index type on > the column storing my array of primary key ids. The index would, for each > primary key id just provide a

Re: [HACKERS] Learning to hack Postgres - Keeping track of ctids

2016-09-30 Thread Emrul
Thanks Craig, I will look at that code. The alternative I'm considering is whether I can define my own index type on the column storing my array of primary key ids. The index would, for each primary key id just provide a reference to the ctids of the related records. In theory, I think this

Re: [HACKERS] Learning to hack Postgres - Keeping track of ctids

2016-09-29 Thread Craig Ringer
On 30 September 2016 at 04:15, Emrul wrote: > Hi, > > I'm working on an idea to implement a graph database in Postgres. At the > moment its just a learning exercise. > > What I'd like to do is store a reference to all the links from one record > using an array type that stores

[HACKERS] Learning to hack Postgres - Keeping track of ctids

2016-09-29 Thread Emrul
Hi, I'm working on an idea to implement a graph database in Postgres. At the moment its just a learning exercise. What I'd like to do is store a reference to all the links from one record using an array type that stores links to all related tables. At first, I've succeeded in doing this using