Re: using postgres sequences on id columns


That makes sense but I was trying to use one sequence for 5 different
so the ids would be unique across all the tables. If the sequence has to
have the same name as the table, that would be impossible. Is that
happening here?

Date: Mon, 7 Nov 2005 16:12:31 -0800 (PST)
From: CSN removed_email_address@domain.invalid
Subject: Re: [Rails] using postgres sequences on id columns
To: removed_email_address@domain.invalid
Message-ID: removed_email_address@domain.invalid
Content-Type: text/plain; charset=iso-8859-1

SERIAL is just an alias for ‘integer no null default
nextval(‘sequence’)…’ Looks like Rails is looking
for a sequence named project_id_seq yet you created
one named unique_sequence.



I’d suggest revisiting your database design. Sounds
like all five tables could be combined into one.


— Larry W. removed_email_address@domain.invalid wrote:

Subject: Re: [Rails] using postgres sequences on id
one named unique_sequence.

CREATE SEQUENCE unique_sequence START 101;
however, I get this error message:


Rails mailing list

Yahoo! Mail - PC Magazine Editors’ Choice 2005