Re: TR: Like and =

From: "Nicolas JOUANIN" <n(dot)jouanin(at)regie-france(dot)com>
To: <pgsql-sql(at)postgresql(dot)org>
Subject: Re: TR: Like and =
Date: 2003-06-27 06:45:52
Message-ID: CEEJJOCKHCPFNIOMMIDFKEIGCHAA.n.jouanin@regie-france.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-sql

In fact I'm trying to migrate a database from Informix IDS to Postgres. This
IDS database uses CHAR so I just let the same.
Now I'm conviced that I sould convert CHAR to VARCHAR.

Thanks.

> -----Message d'origine-----
> De : pgsql-sql-owner(at)postgresql(dot)org
> [mailto:pgsql-sql-owner(at)postgresql(dot)org]De la part de Dani Oderbolz
> Envoye : mercredi 25 juin 2003 14:19
> A : pgsql-sql(at)postgresql(dot)org
> Objet : Re: [SQL] TR: Like and =
>
>
> Nicolas JOUANIN wrote:
>
> >Hi,
> >
> > Thanks for your help. In fact that means 2 solutions for this:
> >
> >1) select * from pdi where rtrim(pdi) = '1006666058'
> >
> >or
> >
> >2) Use VARCHAR instead of CHAR
> >
> >I don't which is the best , but both are working.
> >
> >Nicolas.
> >
> >
>
> Do you have a specific reason why to use CHAR?
> I use CHAR only for certain one-byte flags, and even there its use is
> debatable.
> I would use VARCHAR; if I was you.
>
> Cheers,
> Dani
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 8: explain analyze is your friend

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message James Pye 2003-06-27 07:21:58 persistant psql feature suggestion
Previous Message Tom Lane 2003-06-27 06:00:26 Re: row description for domain in 7.4

Browse pgsql-sql by date

  From Date Subject
Next Message Tomasz Myrta 2003-06-27 07:06:05 Re: Postgres - Delphi Application
Previous Message Tom Lane 2003-06-27 03:49:22 Re: Rules: passing new/old to functions