agora inbox for pgsql-sql@postgresql.org  
help / color / mirror / Atom feed
From: skinner@britvault.co.uk
To: pgsql-sql@postgresql.org
Subject: Re: Re: Advice - indexing on varchar fields where only last x characters known
Date: Fri, 18 Oct 2013 12:37:58 +0100
Message-ID: <20131018113758.GA958@teak.britvault.co.uk> (raw)
In-Reply-To: <201310180822.48251.gary.stainburn@ringways.co.uk>
References: <201310171220.44550.gary.stainburn@ringways.co.uk>
	<1382037390671-5774944.post@n5.nabble.com>
	<201310180822.48251.gary.stainburn@ringways.co.uk>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-sql>

On 2013-10-18 Fri 08:22 AM |, Gary Stainburn wrote:
> 
> While the reverse() option may work for searching it will not be ideal for 
> foreign keys.
> 

Use an integer (serial) as the PK/FK & unique the VIN.

Then you can use reverse() for searching.

Kitcars, boat/garden/equipment/truck trailers, caravans, etc.
might not have any VIN.


-- 
Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-sql



view thread (11+ messages)  latest in thread

Message-ID: <20131018113758.GA958@teak.britvault.co.uk>
Permalink:  ../20131018113758.GA958@teak.britvault.co.uk/
Also on:    postgresql.org/message-id/20131018113758.GA958@teak.britvault.co.uk

reply

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-sql@postgresql.org
  Cc: skinner@britvault.co.uk
  Subject: Re: Re: Advice - indexing on varchar fields where only last x characters known
  In-Reply-To: <20131018113758.GA958@teak.britvault.co.uk>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox