dbTalk Databases Forums  

Re: [PATCHES] [BUGS] BUG #2704: pg_class.relchecks overflow problem

mailing.database.pgsql-bugs mailing.database.pgsql-bugs


Discuss Re: [PATCHES] [BUGS] BUG #2704: pg_class.relchecks overflow problem in the mailing.database.pgsql-bugs forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Tom Lane
 
Posts: n/a

Default Re: [PATCHES] [BUGS] BUG #2704: pg_class.relchecks overflow problem - 11-11-2006 , 10:31 PM






Toru SHIMOGAKI <shimogaki.toru (AT) oss (DOT) ntt.co.jp> writes:
Quote:
+ if (numchecks == 0x7FFF)
+ ereport(ERROR,
+ (errcode(ERRCODE_PROGRAM_LIMIT_EXCEEDED),
+ errmsg("cannot have more than 2^15-1 checks in a table")));
While there's not anything wrong with this proposed patch in itself,
I have to admit that I don't see the point. There are probably
thousands of places in the backend where we increment an integer
value without checking for overflow. Is this one particularly more
likely to occur than other ones, or does it have worse consequences
than other ones? I don't see a security issue here (since the backend
doesn't crash) and I also don't see that this limit is close enough to
real practice to be important to guard against.

It's not that the check imposes any significant addition in code space
or runtime, but what it *would* impose is a nontrivial extra burden on
our message translators. Scale this up by a few hundred or thousand
equally unlikely conditions with their own error messages, and we'd
have a revolt ...

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?

http://archives.postgresql.org


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.