Re: index problem

From: Lincoln Yeoh <lylyeoh(at)mecomb(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Marcin Inkielman <marn(at)wsisiz(dot)edu(dot)pl>, postgres-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: index problem
Date: 2000-06-07 07:24:05
Message-ID: 3.0.5.32.20000607152405.008b8e20@pop.mecomb.po.my
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-general

At 03:00 AM 07-06-2000 -0400, Tom Lane wrote:
>Lincoln Yeoh <lylyeoh(at)mecomb(dot)com> writes:
>> At 10:53 AM 05-06-2000 +0200, Marcin Inkielman wrote:
>>> drop index oceny_stud_numer_albumu_protokoloceny_stud;
>>> failed....
>>> so I used:
>>> drop index "oceny_stud_numer_albumu_protokoloceny_stud";
>>> and it worked for me 8-)))
>
>> I wonder why it worked tho. How does Postgresql treat stuff between double
>> quotes, especially regard to string length limits?
>
>Stuff between double quotes *should* be subject to the same
>NAMEDATALEN-1 restriction as unquoted names. Embarrassingly, 7.0's
>lexer didn't enforce such a limit (it's fixed in 7.0.1 and later)
>which meant that you could overrun the space allocated for names
>in pg_class and other system tables, if you quoted the name.
>
>evidently it worked to match against a quoted-and-not-truncated
>name. I'm pretty surprised that he didn't see coredumps instead.
>
>If you want to trace through the code to discover exactly how it
>managed to avoid crashing, go for it --- but it doesn't seem like
>an especially pressing question from here. To my mind the bug is

Well for some reason things like these tend to set alarm bells off in my
head with a blinking "security" sign :). But of course in most
environments, untrusted users don't get to define their own names (I recall
someone talking about a million table thing, hopefully those tables are
given internally defined names).

Cheerio,

Link.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Marcos Lloret 2000-06-07 08:49:35 'copy-and-paste' old database
Previous Message Tom Lane 2000-06-07 07:00:13 Re: index problem