Ivan Sergio Borgonovo writes:
> I was mainly concerned about assigning ownership of a sequence to a
> column that is not an int.
I think you can get away with that. It's already the case within the
standard usage that the owning column could be either int or bigint.
FWIW, I agree with the idea
On Thu, 20 Aug 2009 14:31:02 -0400
Alvaro Herrera wrote:
> Ivan Sergio Borgonovo wrote:
> > I've
> >
> > create table pr(
> > code varchar(16) primary key,
> > ...
> > );
> > create sequence pr_code_seq owned by pr.code; -- uh!
> > actually stuff like:
> > alter table pr drop column code;
>
Ivan Sergio Borgonovo wrote:
> I've
>
> create table pr(
> code varchar(16) primary key,
> ...
> );
> create sequence pr_code_seq owned by pr.code; -- uh!
>
> pr.code will *mostly* be obtained as
>
> to_hex(feistel_encrypt(nextval('pr_code')))
> and sometimes 'manually' inserting unique code
I've
create table pr(
code varchar(16) primary key,
...
);
create sequence pr_code_seq owned by pr.code; -- uh!
pr.code will *mostly* be obtained as
to_hex(feistel_encrypt(nextval('pr_code')))
and sometimes 'manually' inserting unique codes.
actually stuff like:
alter table pr drop column c