Thread: Re: [HACKERS] varchar() vs char16 performance

Re: [HACKERS] varchar() vs char16 performance

From
Andrew Martin
Date:
> >
> > > Will there be a warning about using a "depreciated type" in 6.4 or are
> > > we going to have this gunking up the grammer forever? :)
> >
> > Good idea. Then we can pull it out of the grammar sometime later. Now,
> > if these types are in a loadable module, then we can't actually do
> > anything in the parser anyway, since the loadable module would never
> > work. Are these character types worth keeping at all? Less support and
> > no performance benefit leaves me thinking not...
>
> IMHO, not worth keeping if the performance benefit is gone and the only
> real benefit though was the few bytes of header space they saved per field.
>

If char2 et al are going completely from 6.4, I think it would be sensible
for pg_dump to filter these types and change them to char(2) et al when
it writes the CREATE statments.

Best wishes,

Andrew

----------------------------------------------------------------------------
Dr. Andrew C.R. Martin                             University College London
EMAIL: (Work) martin@biochem.ucl.ac.uk    (Home) andrew@stagleys.demon.co.uk
URL:   http://www.biochem.ucl.ac.uk/~martin
Tel:   (Work) +44(0)171 419 3890                    (Home) +44(0)1372 275775

Re: [HACKERS] varchar() vs char16 performance

From
Bruce Momjian
Date:
> If char2 et al are going completely from 6.4, I think it would be sensible
> for pg_dump to filter these types and change them to char(2) et al when
> it writes the CREATE statments.
>

That is an interesting idea, but what about applications that use them?
I think we can have the parser change them for one release, then drop
them completely.

--
Bruce Momjian                          |  830 Blythe Avenue
maillist@candle.pha.pa.us              |  Drexel Hill, Pennsylvania 19026
  +  If your life is a hard drive,     |  (610) 353-9879(w)
  +  Christ can be your backup.        |  (610) 853-3000(h)