On 2/7/06, Martijn van Oosterhout wrote:
> On Tue, Feb 07, 2006 at 03:28:31PM +0300, Nikolay Samokhvalov wrote:
> > The real situation would be as the following.
> > I want to use some algorithm to hide real number of registered users
> > in my table user. So, I don't want to use simple sequence,
On Fri, Feb 10, 2006 at 07:34:35 -0500,
Doug McNaught <[EMAIL PROTECTED]> wrote:
> Bruno Wolff III <[EMAIL PROTECTED]> writes:
>
> Or, just start your sequence counting at 100. Or use bigint and
> start it at a billion.
That may work if you only have access to one id number, but you don't
Bruno Wolff III <[EMAIL PROTECTED]> writes:
> On Tue, Feb 07, 2006 at 15:28:31 +0300,
> Nikolay Samokhvalov <[EMAIL PROTECTED]> wrote:
>> The real situation would be as the following.
>> I want to use some algorithm to hide real number of registered users
>> in my table user. So, I don't want to
On Tue, Feb 07, 2006 at 15:28:31 +0300,
Nikolay Samokhvalov <[EMAIL PROTECTED]> wrote:
> The real situation would be as the following.
> I want to use some algorithm to hide real number of registered users
> in my table user. So, I don't want to use simple sequence, when every
> new registered us
Joachim Wieland wrote:
> On Wed, Feb 08, 2006 at 09:03:54AM -0500, Bruce Momjian wrote:
> > Joachim Wieland wrote:
> > > On Tue, Feb 07, 2006 at 09:49:02AM -0500, Bruce Momjian wrote:
> > > > > The correct solution to this is to forbid ALTER COLUMN SET DEFAULT on
> > > > > a serial column, but we h
On Wed, Feb 08, 2006 at 09:03:54AM -0500, Bruce Momjian wrote:
> Joachim Wieland wrote:
> > On Tue, Feb 07, 2006 at 09:49:02AM -0500, Bruce Momjian wrote:
> > > > The correct solution to this is to forbid ALTER COLUMN SET DEFAULT on
> > > > a serial column, but we haven't gotten around to enforcing
Joachim Wieland wrote:
> On Tue, Feb 07, 2006 at 09:49:02AM -0500, Bruce Momjian wrote:
> > > The correct solution to this is to forbid ALTER COLUMN SET DEFAULT on
> > > a serial column, but we haven't gotten around to enforcing that yet.
>
> > TODO has:
>
> > * %Disallow changing default exp
On Tue, Feb 07, 2006 at 09:49:02AM -0500, Bruce Momjian wrote:
> > The correct solution to this is to forbid ALTER COLUMN SET DEFAULT on
> > a serial column, but we haven't gotten around to enforcing that yet.
> TODO has:
> * %Disallow changing default expression of a SERIAL column
This sh
There is no SERIAL type in the standard at all. Moreover, standard
defines following expression for SEQUENCE GENERATORs:
::= NEXT VALUE FOR
Postgres has non-standard equivalent - nextval()...
So, sequences implementation in PostgreSQL isn't standard-compliant.
On 2/7/06, John D. Burger <[EMAI
"John D. Burger" <[EMAIL PROTECTED]> writes:
> Tom Lane wrote:
>> The correct solution to this is to forbid ALTER COLUMN SET DEFAULT on
>> a serial column, but we haven't gotten around to enforcing that yet.
> Is this per the Standard?
SERIAL isn't in the standard.
> If so, then the oft-repeated
Tom Lane wrote:
The correct solution to this is to forbid ALTER COLUMN SET DEFAULT on
a serial column, but we haven't gotten around to enforcing that yet.
Is this per the Standard? If so, then the oft-repeated mantra that
SERIAL is simply a macro for an INTEGER column with a particular
DEFA
Nikolay Samokhvalov <[EMAIL PROTECTED]> writes:
> Forget about SERIAL. I have INTEGER column with some expression as
> DEFAULT in it.
No, you have a SERIAL column that you've improperly mucked with the
implementation of. If you'd declared it as INTEGER to start with,
you could do whatever you wan
Nikolay Samokhvalov wrote:
> On 2/7/06, Tom Lane <[EMAIL PROTECTED]> wrote:
> > Nikolay Samokhvalov <[EMAIL PROTECTED]> writes:
> > > testseq=# CREATE TABLE test(id SERIAL, data TEXT);
> > > NOTICE: CREATE TABLE will create implicit sequence "test_id_seq" for
> > > serial column "test.id"
> > > CR
On 2/7/06, Tom Lane <[EMAIL PROTECTED]> wrote:
> Nikolay Samokhvalov <[EMAIL PROTECTED]> writes:
> > testseq=# CREATE TABLE test(id SERIAL, data TEXT);
> > NOTICE: CREATE TABLE will create implicit sequence "test_id_seq" for
> > serial column "test.id"
> > CREATE TABLE
> > ***
> > ALTER TABLE test
Tom Lane wrote:
> Nikolay Samokhvalov <[EMAIL PROTECTED]> writes:
> > testseq=# CREATE TABLE test(id SERIAL, data TEXT);
> > NOTICE: CREATE TABLE will create implicit sequence "test_id_seq" for
> > serial column "test.id"
> > CREATE TABLE
> > ***
> > ALTER TABLE test ALTER COLUMN id SET DEFAULT ne
Nikolay Samokhvalov <[EMAIL PROTECTED]> writes:
> testseq=# CREATE TABLE test(id SERIAL, data TEXT);
> NOTICE: CREATE TABLE will create implicit sequence "test_id_seq" for
> serial column "test.id"
> CREATE TABLE
> ***
> ALTER TABLE test ALTER COLUMN id SET DEFAULT nextval('test_id_seq') * 10;
Th
On Tue, Feb 07, 2006 at 03:28:31PM +0300, Nikolay Samokhvalov wrote:
> The real situation would be as the following.
> I want to use some algorithm to hide real number of registered users
> in my table user. So, I don't want to use simple sequence, when every
> new registered user in my system can
On 2/7/06, Martijn van Oosterhout wrote:
> On Tue, Feb 07, 2006 at 02:33:56PM +0300, Nikolay Samokhvalov wrote:
> Well, it's a very contrived example (I can't think of a reason why one
> would do that) but I agree it is a bug. You could acheive the same
> effect by setting the step of the sequenc
On Tue, Feb 07, 2006 at 02:33:56PM +0300, Nikolay Samokhvalov wrote:
> Maybe it was discussed already, but I think it's very strange behavior
> and things should be changed (please correct me if I'm wrong)
>
> Suppose we have database containing only one simple table:
> So, if we don't know the
19 matches
Mail list logo