Unix Technical Forum

Re: Current enums patch

This is a discussion on Re: Current enums patch within the Pgsql Patches forums, part of the PostgreSQL category; --> > Looks like we need to check the length on type creation > too. > > I'll fix later ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > Pgsql Patches

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-18-2008, 09:49 AM
Tom Dunstan
 
Posts: n/a
Default Re: Current enums patch

> Looks like we need to check the length on type creation
> too.
>
> I'll fix later if not beaten to it.


It works for me (ie fails with an appropriate error) locally
on Linux FC6 x86-64. Perhaps this platform initializes
memory to zero on allocation? I dunno. Anyway, if you can
reproduce it, please have a go, I'm at work and won't be
able to do anything more in depth for some time.

I could have sworn that I had some bounds checking in there
at one point, but it doesn't seem to be in the latest
version of the code. *shrug*. It should be both in
cstring_enum() in enum.c and in DefineEnum() in typecmds.c.

Cheers

Tom

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

http://archives.postgresql.org

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-18-2008, 09:50 AM
Tom Lane
 
Posts: n/a
Default Re: Current enums patch

"Tom Dunstan" <pgsql@tomd.cc> writes:
>> Looks like we need to check the length on type creation
>> too.


> It works for me (ie fails with an appropriate error) locally
> on Linux FC6 x86-64. Perhaps this platform initializes
> memory to zero on allocation?


Sounds more like you're testing without asserts enabled; tut tut.

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@postgresql.org so that your
message can get through to the mailing list cleanly

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
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
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 12:07 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com