Re: auto-filling a field on insert

From: Richard Broersma <richard(dot)broersma(at)gmail(dot)com>
To: semi-ambivalent <thefronny(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: auto-filling a field on insert
Date: 2009-10-22 13:38:52
Message-ID: 396486430910220638m6dff03f7mfe7e821a450b75df@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wed, Oct 21, 2009 at 8:54 PM, semi-ambivalent <thefronny(at)gmail(dot)com> wrote:
> At first blush that looks good but I need an index on that concatted
> value and I don't seem to be able to index a field in a view. I'll
> check the docs on views to see if I'm missing something.

To create an index on a computed value you use an "index on
expression". Here are more details on how to do it:

http://www.postgresql.org/docs/8.4/interactive/indexes-expressional.html

--
Regards,
Richard Broersma Jr.

Visit the Los Angeles PostgreSQL Users Group (LAPUG)
http://pugs.postgresql.org/lapug

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Roderick A. Anderson 2009-10-22 14:41:53 Re: auto-filling a field on insert
Previous Message Kaori Inaba 2009-10-22 13:30:22 PostgreSQL Conference 2009 Japan : Schedule available and registration open