Skip site navigation (1) Skip section navigation (2)

Re: [INTERFACES] calculated identity field in views, again...

From: Bruno Wolff III <bruno(at)wolff(dot)to>
To: Greg Stark <gsstark(at)mit(dot)edu>
Cc: Zlatko Matic <zlatko(dot)matic1(at)sb(dot)t-com(dot)hr>,pgsql-general(at)postgresql(dot)org, pgsql-interfaces(at)postgresql(dot)org
Subject: Re: [INTERFACES] calculated identity field in views, again...
Date: 2005-05-04 16:46:29
Message-ID: 20050504164629.GA30968@wolff.to (view raw or flat)
Thread:
Lists: pgsql-generalpgsql-interfaces
On Wed, May 04, 2005 at 11:47:12 -0400,
  Greg Stark <gsstark(at)mit(dot)edu> wrote:
> Bruno Wolff III <bruno(at)wolff(dot)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.

In response to

pgsql-interfaces by date

Next:From: Frost, Mr. Michael (contractor)Date: 2005-05-04 17:09:15
Subject: Re: PQescapeBytea & PQunescapeBytea
Previous:From: Jeff EckermannDate: 2005-05-04 16:01:24
Subject: Re: [INTERFACES] calculated identity field in views, again...

pgsql-general by date

Next:From: Bruno Wolff IIIDate: 2005-05-04 16:58:47
Subject: Re: nonremovable row ?
Previous:From: FmiserDate: 2005-05-04 16:35:59
Subject: Howto prevent write based on date

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group