Обсуждение: [HACKERS] Re: [PATCHES] Raymond Toy: Case sensitivity bug with large objects!

Поиск
Список
Период
Сортировка

[HACKERS] Re: [PATCHES] Raymond Toy: Case sensitivity bug with large objects!

От
"Vadim B. Mikheev"
Дата:
Bruce Momjian wrote:
>
> > Also, please change vacuum:
> >
> >         /* don't vacuum large objects for now - something breaks when we do */
> >         if ( (strlen(rname) > 4) && rname[0] == 'X' &&
> >                 rname[1] == 'i' && rname[2] == 'n' &&
> >                 (rname[3] == 'v' || rname[3] == 'x'))
> >
> > There may be other places...
>
> Thanks.  Fixed.
>
> I looked through the code for 'X', and it looks like that is the only
> place left.
>
> The lack of case-sensitivity could cause tables that start with xinv* to
> be confused as large objects.
>
> What do we do?

Use relkind in pg_class:

#define       RELKIND_INDEX           'i'     /* secondary index */
#define       RELKIND_RELATION        'r'     /* cataloged heap */
#define       RELKIND_SPECIAL         's'     /* special (non-heap) */
#define       RELKIND_SEQUENCE        'S'     /* SEQUENCE relation */
#define       RELKIND_UNCATALOGED     'u'     /* temporary heap */

+ #define       RELKIND_LO_RELATION        'X'     /* large object relation */
+ #define       RELKIND_LO_INDEX           'x'     /* large object index */

and change heap_create & heap_creatr to pass relkind to them.

But leave it for 6.2[345...]

BTW, it's better to start thinking about BLOB implementation...

Vadim

------------------------------

Re: [HACKERS] Re: [PATCHES] Raymond Toy: Case sensitivity bug with large objects!

От
The Hermit Hacker
Дата:
On Thu, 5 Jun 1997, Bruce Momjian wrote:

> > Also, please change vacuum:
> >
> >         /* don't vacuum large objects for now - something breaks when we do */
> >         if ( (strlen(rname) > 4) && rname[0] == 'X' &&
> >                 rname[1] == 'i' && rname[2] == 'n' &&
> >                 (rname[3] == 'v' || rname[3] == 'x'))
> >
> > There may be other places...
>
> Thanks.  Fixed.
>
> I looked through the code for 'X', and it looks like that is the only
> place left.
>
> The lack of case-sensitivity could cause tables that start with xinv* to
> be confused as large objects.
>
> What do we do?

    That was why I thought we hadn't done it previously :(

Marc G. Fournier
Systems Administrator @ hub.org
primary: scrappy@hub.org           secondary: scrappy@{freebsd|postgresql}.org

------------------------------

Re: [HACKERS] Re: [PATCHES] Raymond Toy: Case sensitivity bug with large objects!

От
"Thomas G. Lockhart"
Дата:
The Hermit Hacker wrote:
> > The lack of case-sensitivity could cause tables that start with xinv* to
> > be confused as large objects.
> >
> > What do we do?

Could the xinv* names generated by postgres to support large objects
have a slightly different name, for example starting with an underscore
or a dot?

            - Tom

------------------------------

Re: [HACKERS] Re: [PATCHES] Raymond Toy: Case sensitivity bug with large objects!

От
Bruce Momjian
Дата:
>
> The Hermit Hacker wrote:
> > > The lack of case-sensitivity could cause tables that start with xinv* to
> > > be confused as large objects.
> > >
> > > What do we do?
>
> Could the xinv* names generated by postgres to support large objects
> have a slightly different name, for example starting with an underscore
> or a dot?

We could change large object names from xinv to _inv?  That makes sense.
pg_dump does not process large objects.

What do we do with 6.1?  How many people have tables that begin with
xinv?

- --
Bruce Momjian
maillist@candle.pha.pa.us

------------------------------

Re: [HACKERS] Re: [PATCHES] Raymond Toy: Case sensitivity bug with large objects!

От
"Vadim B. Mikheev"
Дата:
Bruce Momjian wrote:
>
> >
> > The Hermit Hacker wrote:
> > > > The lack of case-sensitivity could cause tables that start with xinv* to
> > > > be confused as large objects.
> > > >
> > > > What do we do?
> >
> > Could the xinv* names generated by postgres to support large objects
> > have a slightly different name, for example starting with an underscore
> > or a dot?
>
> We could change large object names from xinv to _inv?  That makes sense.
> pg_dump does not process large objects.

Why don't use relkind ?

>
> What do we do with 6.1?  How many people have tables that begin with
> xinv?
>
> --
> Bruce Momjian
> maillist@candle.pha.pa.us

------------------------------