Re: Calculated bigserial column in a view

From: "Jeff Eckermann" <jeff_eckermann(at)yahoo(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Calculated bigserial column in a view
Date: 2005-04-26 14:27:48
Message-ID: d4lj13$8oc$1@news.hub.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

"Bruno Wolff III" <bruno(at)wolff(dot)to> wrote in message
news:20050425201046(dot)GA16773(at)wolff(dot)to(dot)(dot)(dot)
> Please keep replies copied to the list so that other people can learn from
> and comment on the discussion unless to have a good reason to make the
> thread private.
>
> On Mon, Apr 25, 2005 at 21:46:20 +0200,
> Zlatko Matic <zlatko(dot)matic1(at)sb(dot)t-com(dot)hr> wrote:
>> The reason for such crazy idea is my front-end MS Access which considers
>> views as tables and have problem with tables ( views also) if there is no
>> unique numeric field...
>> Anyway, how to do it ?

You can tell Access to use any combination of fields as a primary key, when
linking to the view. There must be some unique combination that will work
as a key. But this is really of no significance unless you want to issue
inserts or updates against the view, which raises another set of issues.

>> Thanks.
>
> I don't know MS Access, so I am not going to be able to help much with
> this.
> There may be some way to trick MS Access into thinking that your view has
> a unique numeric field. It would help to know how it knows that a column
> has those properties and how it uses the information.
>
>>
>> ----- Original Message -----
>> From: "Bruno Wolff III" <bruno(at)wolff(dot)to>
>> To: "Zlatko Matic" <zlatko(dot)matic1(at)sb(dot)t-com(dot)hr>
>> Cc: <pgsql-general(at)postgresql(dot)org>
>> Sent: Monday, April 25, 2005 6:31 AM
>> Subject: Re: [GENERAL] Calculated bigserial column in a view
>>
>>
>> >On Sun, Apr 24, 2005 at 22:16:14 +0200,
>> > Zlatko Matic <zlatko(dot)matic1(at)sb(dot)t-com(dot)hr> wrote:
>> >>I know that it sounds crazy,
>> >>but I need a bigserial coulumn in a view that is consisted of several
>> >>tables.
>> >>That column should not be based on bigserial column of any table, but
>> >>should be a calculated column...
>> >>How can I accomplish it ?
>> >
>> >This doesn't really make sense. It sounds like you want a key that is
>> >unique
>> >accross the union of several tables and that doesn't change when other
>> >rows
>> >in the union are added or removed. There are a couple of ways you might
>> >go about doing something like this. Is this what you really want?
>> >
>> >---------------------------(end of broadcast)---------------------------
>> >TIP 5: Have you checked our extensive FAQ?
>> >
>> > http://www.postgresql.org/docs/faq
>> >
>>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo(at)postgresql(dot)org
>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message John DeSoi 2005-04-26 14:50:01 Re: Postgres source (tar file) for Fedora Core OS?
Previous Message Pavel Stehule 2005-04-26 14:05:30 Re: Immutable attributes? Correction