Re: Drawbacks of using BYTEA for PK? - Mailing list pgsql-general

From Greg Stark
Subject Re: Drawbacks of using BYTEA for PK?
Date
Msg-id 87r7y4qv3i.fsf@stark.xeocode.com
Whole thread Raw
In response to Re: Drawbacks of using BYTEA for PK?  ("D. Dante Lorenso" <dante@lorenso.com>)
List pgsql-general
"D. Dante Lorenso" <dante@lorenso.com> writes:

> Maybe a better example of my problem is with records throughout the system
> like invoices, customer data, etc...  If any of these items use a sequence
> and that sequence is global to the table in the database and the number is
> exposed externally, then it is possible to infer the success of the company
> underneath, is it not?

Except that's exactly the way business has always been done. Though people
usually start new accounts with check# 50000 or something like that for
precisely that reason. But it's still pretty transparent, and they don't
really worry about it too much.

What you're saying is fundamentally valid, but I tend to think these kinds of
concerns are just generically overblown.

My only comment was that just taking an MD5 of the sequence gives you no
security. At the very least you have to include a secret. Even then I suspect
there are further subtle cryptographic issues. There always are.

--
greg

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: Column qualifier issue
Next
From: "Chris Ochs"
Date:
Subject: Re: sql insert function