Re: Creste Index with nullable

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Diego <diego(at)unimedijui(dot)com(dot)br>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: Creste Index with nullable
Date: 2006-01-17 15:20:50
Message-ID: 28458.1137511250@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Diego <diego(at)unimedijui(dot)com(dot)br> writes:
> I can create a index like
> "CREATE INDEX idx_test ON etqmov USING btree (name, last_name)"
> using a nullable field? Will work fine?

Sure. Note however that "last_name IS NULL" is not an indexable
operation, so you won't be able to use the index to search for rows
containing nulls. This may or may not matter to you, but if it does
you'll need to think of another way to locate those rows. (Some people
solve this sort of problem with partial indexes.)

regards, tom lane

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Tom Lane 2006-01-17 15:23:21 Re: LOG: incomplete startup packet
Previous Message Diego 2006-01-17 13:10:58 Creste Index with nullable