Search Postgresql Archives

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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I will try...if it will be useless, I will quite. Then the only solution will be make-table query based on nested pass-through query, so I will be working on local JET tables that will be refreshed from server on each session. But I would like to avoid local tables, if possible...

How do I create sequence ?



----- Original Message ----- From: "Greg Stark" <gsstark@xxxxxxx>
To: "Zlatko Matic" <zlatko.matic1@xxxxxxxxxxx>
Cc: <pgsql-general@xxxxxxxxxxxxxx>; <pgsql-interfaces@xxxxxxxxxxxxxx>
Sent: Wednesday, May 04, 2005 7:11 AM
Subject: Re: [INTERFACES] calculated identity field in views, again...



"Zlatko Matic" <zlatko.matic1@xxxxxxxxxxx> 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


---------------------------(end of broadcast)--------------------------- TIP 4: Don't 'kill -9' the postmaster



---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux