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

From: Greg Stark <gsstark(at)mit(dot)edu>
To: "Zlatko Matic" <zlatko(dot)matic1(at)sb(dot)t-com(dot)hr>
Cc: <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 05:11:24
Message-ID: 877jifwp6r.fsf@stark.xeocode.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-interfaces

"Zlatko Matic" <zlatko(dot)matic1(at)sb(dot)t-com(dot)hr> writes:

> In regular tables, I use bigserial field, but how can I create calculated
> bigserial column in a view ?

You would have to create a sequence and reference it with
nextval('sequencename') in your view. But I doubt very much that it will do
anything useful.

It sounds like Access wants to be able to update records by looking them up by
primary key. In that case assigning a new value in your view will make
Postgres make up a brand new number that is utterly useless for finding the
record again later.

--
greg

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Oleg Bartunov 2005-05-04 07:05:37 Re: Interesting article on transactional algorithms includes
Previous Message Lipy Reis 2005-05-04 04:21:44 Postgre 8.0 for Linux i586

Browse pgsql-interfaces by date

  From Date Subject
Next Message Zlatko Matic 2005-05-04 08:56:25 Re: [INTERFACES] calculated identity field in views, again...
Previous Message Lipy Reis 2005-05-04 04:21:44 Postgre 8.0 for Linux i586