Re: calculated identity field in views, again... - Mailing list pgsql-interfaces

From Bruno Wolff III
Subject Re: calculated identity field in views, again...
Date
Msg-id 20050504164629.GA30968@wolff.to
Whole thread Raw
In response to Re: calculated identity field in views, again...  (Greg Stark <gsstark@mit.edu>)
List pgsql-interfaces
On Wed, May 04, 2005 at 11:47:12 -0400,
  Greg Stark <gsstark@mit.edu> wrote:
> Bruno Wolff III <bruno@wolff.to> writes:
>
> > > How do I create sequence ?
> >
> > You can't create a sequence for a view. You would need to have it in a
> > table that is joined as part of the view.
>
> Sure you can. You can have any expression you want, including nextval('seq')
> in your view. The problem is that every time you query it it will provide
> different numbers. I can't see that being useful.

That is more or less what I meant. You can't usefully tie a sequence directly
to a view, the way you can tie one to a table.

pgsql-interfaces by date:

Previous
From: Jeff Eckermann
Date:
Subject: Re: calculated identity field in views, again...
Next
From: "Frost, Mr. Michael (contractor)"
Date:
Subject: Re: PQescapeBytea & PQunescapeBytea