Re: genomic locus

From: Craig Ringer <craig(at)2ndquadrant(dot)com>
To: Gene Selkov <selkovjr(at)gmail(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: genomic locus
Date: 2017-12-18 12:59:31
Message-ID: CAMsr+YG6JJSXaWQ2wkNa5WBo4sXtg3k5ZtyLuVYtOuaVbgcQ7g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 16 December 2017 at 03:49, Gene Selkov <selkovjr(at)gmail(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Huong Dangminh 2017-12-18 13:19:37 RE: User defined data types in Logical Replication
Previous Message Andrey Borodin 2017-12-18 12:36:34 Re: Tracking of page changes for backup purposes. PTRACK [POC]