Re: String-with-number sort and insert order preservation

From: Aristedes Maniatis (ar..aniatis.org)
Date: Wed Feb 03 2010 - 08:35:19 EST

  • Next message: Mike Kienenberger: "Re: String-with-number sort and insert order preservation"

    On 3/02/10 11:04 PM, Marek Šabo wrote:
    > haven't any of you ever needed or wanted the data to be indexed by
    > auto-generated pk in order you add them to context while in persisting
    > phase?

    Sure, but the solution is trivial. Add a 'created_on' field to that table. Stick the current datetime in there.

    Every single time in my entire career I've ever come across meaningful primary keys, problems have been caused as a result. I even came across one database where the developer had twisted themselves in knots complying with a customer demand that the meaningful primary key be able to be user modified. That code updated foreign keys in 12 related tables.

    Ari

    -- 
    -------------------------->
    Aristedes Maniatis
    GPG fingerprint CBFB 84B4 738D 4E87 5E5C  5EFA EF6A 7D2E 3E49 102A
    



    This archive was generated by hypermail 2.0.0 : Wed Feb 03 2010 - 08:36:06 EST