Professional Web Applications Themes

Shared Sequences? - PostgreSQL / PGSQL

Is there any way, with PG 8 rc 3, to share a sequence across databases - assuming all databases are on the same machine? Thanks, Dunc ---------------------------(end of broadcast)--------------------------- TIP 4: Don't 'kill -9' the postmaster...

  1. #1

    Default Shared Sequences?

    Is there any way, with PG 8 rc 3, to share a sequence across databases -
    assuming all databases are on the same machine? Thanks,

    Dunc

    ---------------------------(end of broadcast)---------------------------
    TIP 4: Don't 'kill -9' the postmaster

    C. Duncan Hudson Guest

  2. #2

    Default Re: Shared Sequences?

    begin "C. Duncan Hudson" <postgresqldunc-it.com> wrote:
    > Is there any way, with PG 8 rc 3, to share a sequence across databases -
    > assuming all databases are on the same machine? Thanks,
    Possibly via contrib/dblink, also on ealier versions.
    I'm not sure about sequences, but with tables this is possible.



    end
    Andreas
    --
    Diese Message wurde erstellt mit freundlicher Unterstützung eines freilau-
    fenden Pinguins aus artgerechter Freilandhaltung. Er ist garantiert frei
    von Micro$oft'schen Viren. (#97922 [url]http://counter.li.org[/url]) GPG 7F4584DA
    Was, Sie wissen nicht, wo Kaufbach ist? Hier: N 51.05082°, E 13.56889° ;-)
    Andreas Kretschmer Guest

  3. #3

    Default Re: Shared Sequences?

    On Sun, Jan 02, 2005 at 10:44:16AM -0500, C. Duncan Hudson wrote:
    > Is there any way, with PG 8 rc 3, to share a sequence across databases -
    > assuming all databases are on the same machine?
    As Andreas Kretschmer mentioned, you might be able to use dblink.

    Why do you want to share a sequence across databases? Could you
    use separate schemas in one database instead of separate databases?

    --
    Michael Fuhr
    [url]http://www.fuhr.org/~mfuhr/[/url]

    ---------------------------(end of broadcast)---------------------------
    TIP 3: if posting/reading through Usenet, please send an appropriate
    subscribe-nomail command to [email]majordomopostgresql.org[/email] so that your
    message can get through to the mailing list cleanly

    Michael Fuhr Guest

  4. #4

    Default Re: Shared Sequences?

    Michael Fuhr wrote:
    >On Sun, Jan 02, 2005 at 10:44:16AM -0500, C. Duncan Hudson wrote:
    >
    >
    >
    >>Is there any way, with PG 8 rc 3, to share a sequence across databases -
    >>assuming all databases are on the same machine?
    >>
    >>
    >
    >As Andreas Kretschmer mentioned, you might be able to use dblink.
    >
    >Why do you want to share a sequence across databases? Could you
    >use separate schemas in one database instead of separate databases?
    >
    >
    >
    Unfortunately, the app that I'm using doesn't yet support schemas -
    otherwise I'd be doing that. I have 3 instances of the application
    (each for a different business unit) and I don't want them generating
    the same numbers for different things. I want the numbers, across all
    business units, to be truly chronological - so I'd like them to share
    the same sequence.


    Dunc

    ---------------------------(end of broadcast)---------------------------
    TIP 6: Have you searched our list archives?

    [url]http://archives.postgresql.org[/url]

    C. Duncan Hudson Guest

  5. #5

    Default Re: Shared Sequences?

    On Sun, 2005-01-02 at 16:19 -0500, C. Duncan Hudson wrote:

    [about databases sharing a sequence]
    > I have 3 instances of the application
    > (each for a different business unit) and I don't want them generating
    > the same numbers for different things. I want the numbers, across all
    > business units, to be truly chronological - so I'd like them to share
    > the same sequence.
    do you realize that sequences are not garanteed to be "chronological"?

    gnari




    ---------------------------(end of broadcast)---------------------------
    TIP 4: Don't 'kill -9' the postmaster

    Ragnar Hafstað Guest

Similar Threads

  1. Storing sequences
    By turnitup in forum MySQL
    Replies: 2
    Last Post: June 5th, 10:39 PM
  2. Image Replacement - Effects? Sequences?
    By corywilkerson in forum Macromedia Flex General Discussion
    Replies: 0
    Last Post: February 24th, 07:11 PM
  3. New Sequences for Batch Processing
    By Matt_Torbin@adobeforums.com in forum Adobe Acrobat Macintosh
    Replies: 9
    Last Post: July 29th, 01:56 PM
  4. SOAP4r sequences and authentication
    By Martin Stannard in forum Ruby
    Replies: 1
    Last Post: November 11th, 02:16 AM
  5. reordering column sequences
    By BK Kim in forum ASP.NET Data Grid Control
    Replies: 0
    Last Post: September 8th, 11:24 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139