From: Greg Stark <gsstark@mit.edu>
To: Zlatko Matic <zlatko.matic1@sb.t-com.hr>
Cc: pgsql-general@postgresql.org
Cc: pgsql-interfaces@postgresql.org
Subject: Re: [INTERFACES] calculated identity field in views, again...
Date: 04 May 2005 01:11:24 -0400
Message-ID: <877jifwp6r.fsf@stark.xeocode.com> (raw)
In-Reply-To: <001201c5502c$1c030430$2d8b1dc3@zlatkovyfkpgz6>
References: <20050503151626.37630.qmail@web52405.mail.yahoo.com>
<4277EAEF.5030707@mailblocks.com>
<001201c5502c$1c030430$2d8b1dc3@zlatkovyfkpgz6>
"Zlatko Matic" <zlatko.matic1@sb.t-com.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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-interfaces@postgresql.org
Cc: gsstark@mit.edu, zlatko.matic1@sb.t-com.hr, pgsql-general@postgresql.org
Subject: Re: [INTERFACES] calculated identity field in views, again...
In-Reply-To: <877jifwp6r.fsf@stark.xeocode.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox