Unix Technical Forum

Bug in date.c

This is a discussion on Bug in date.c within the Pgsql Patches forums, part of the PostgreSQL category; --> ---------------------------(end of broadcast)--------------------------- TIP 3: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faq...


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

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-18-2008, 11:11 AM
Gregory Stark
 
Posts: n/a
Default Bug in date.c


---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faq

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

Gregory Stark <stark@enterprisedb.com> writes:
> There's a bug in datetime.c when it handles errors converting text into
> various date formats. It tries to avoid palloc'ing a cstring copy of the in=
> put
> by storing it in a stack variable instead but that means it can't handle
> inputs over MAXDATELEN. So it throws an error but passes the varlena string
> where the format expects a c string. Of course having to generate a c string
> for the format begs the question...


Good catch. I'm hoping that all three of these functions will go away
before 8.3 is out (in favor of a generic text cast capability), but we
need a back-patchable fix for the released branches. So the "minimal"
patch looks the best to me --- least risk of patch trouble.

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

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 04:23 PM.


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