Welcome to ModelRight Database Design Tool - Database Modeling Done Right Sign in | Join | Help
in

Creating sequences issues (PostGRES)

Last post 08-21-2009, 12:57 AM by tmhp. 5 replies.
Sort Posts: Previous Next
  •  08-06-2009, 3:41 AM 1291

    Creating sequences issues (PostGRES)

    Hi Guys,

     I've just noticed that when creating a new table that requires a serial column, the generation script starts with:

    CREATE SEQUENCE public.http_config_http_cnfg_ref_seq

    INCREMENT BY 1

    MINVALUE 1

    START 1

    CACHE 1

    NO CYCLE

    OWNED BY http_config.http_cnfg_ref

    ;

    The problem here, is the table doesn't exist yet, so this doesn't execute. Should it not create the sequence first then then the table with an int or bigint then assign the nextval of the sequence as the default value of the table int?

    That sort of thing isn't really my forte, but i do know it's currently not working.

    If I''m doing something silly, please let me know.

    Cheers. Regards, TM 

  •  08-06-2009, 7:32 AM 1292 in reply to 1291

    Re: Creating sequences issues (PostGRES)

    Thanks for reporting this (and using the product!). We'll look into it. Sounds like an issue. In most other databases, sequences are not owned by tables, that's why, in general, ModelRight creates sequences before tables; however we might need to adjust this for PGSQL
    ModelRight Evangelist
  •  08-09-2009, 5:39 PM 1293 in reply to 1292

    Re: Creating sequences issues (PostGRES)

    This problem is fixed in the next build. We will update when is available (within the next few days).
    ModelRight Evangelist
  •  08-10-2009, 3:34 AM 1294 in reply to 1293

    Re: Creating sequences issues (PostGRES)

    Excellent. Thanks mate.
  •  08-13-2009, 8:42 AM 1299 in reply to 1294

    Re: Creating sequences issues (PostGRES)

    build 3517 is up... please let us know how it works.


    ModelRight Evangelist
  •  08-21-2009, 12:57 AM 1301 in reply to 1299

    Re: Creating sequences issues (PostGRES)

    The bug is fixed. Thanks guys.