Re: genomic locus - Mailing list pgsql-hackers

From Craig Ringer
Subject Re: genomic locus
Date
Msg-id CAMsr+YG6JJSXaWQ2wkNa5WBo4sXtg3k5ZtyLuVYtOuaVbgcQ7g@mail.gmail.com
Whole thread Raw
In response to genomic locus  (Gene Selkov <selkovjr@gmail.com>)
Responses Re: genomic locus  (Gene Selkov <selkovjr@gmail.com>)
List pgsql-hackers
On 16 December 2017 at 03:49, Gene Selkov <selkovjr@gmail.com> wrote:
Greetings everyone,

I need a data type to represent genomic positions, which will consist of a string and a pair of integers with interval logic and access methods. Sort of like my seg type, but more straightforward.

I noticed somebody took a good care of seg while I was away for the last 20 years, and I am extremely grateful for that. I have been using it. In the meantime, things have changed and now I am almost clueless about how you deal with contributed modules and what steps I should take once I get it to work. Also, is it a good idea to clone and fix seg for this purpose, or is there a more appropriate template? Or maybe just building it from scratch will be a better idea?

I have seen a lot of bit rot in other extensions (never contributed) that I have not maintained since 2009 and I now I am unable to fix some of them, so I wonder how much of old knowledge is still applicable. In other words, is what I see in new code just a change of macros or the change of principles?

Welcome back!

I think your chances of modifying 'seg' are slim, since you'd surely have to change the on-disk format and that'd break existing users. Plus probably change the API.

If you think it'd make logical sense to extend seg with a string descriptor of some sort and could come up with a name/use case that's not quite so narrowly focused as genetics alone, then I could see adding it as a secondary type in the same extension.

But it's more likely that the best course would be to extract the seg extension from core, rename it, hack it as desired, and build it as an extension maintained out-of-tree. 

--
 Craig Ringer                   http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services

pgsql-hackers by date:

Previous
From: Andrey Borodin
Date:
Subject: Re: Tracking of page changes for backup purposes. PTRACK [POC]
Next
From: Huong Dangminh
Date:
Subject: RE: User defined data types in Logical Replication