Unix Technical Forum

pgsql: Make eval_const_expressions() preserve typmod when simplifying

This is a discussion on pgsql: Make eval_const_expressions() preserve typmod when simplifying within the pgsql Committers forums, part of the PostgreSQL category; --> Log Message: ----------- Make eval_const_expressions() preserve typmod when simplifying something like null::char(3) to a simple Const node. (It already ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > pgsql Committers

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-11-2008, 01:38 AM
Tom Lane
 
Posts: n/a
Default pgsql: Make eval_const_expressions() preserve typmod when simplifying

Log Message:
-----------
Make eval_const_expressions() preserve typmod when simplifying something like
null::char(3) to a simple Const node. (It already worked for non-null values,
but not when we skipped evaluation of a strict coercion function.) This
prevents loss of typmod knowledge in situations such as exhibited in bug
#3598. Unfortunately there seems no good way to fix that bug in 8.1 and 8.2,
because they simply don't carry a typmod for a plain Const node.

In passing I made all the other callers of makeNullConst supply "real" typmod
values too, though I think it probably doesn't matter anywhere else.

Modified Files:
--------------
pgsql/src/backend/commands:
tablecmds.c (r1.231 -> r1.232)
(http://developer.postgresql.org/cvsw...1.231&r2=1.232)
pgsql/src/backend/executor:
execQual.c (r1.221 -> r1.222)
(http://developer.postgresql.org/cvsw...1.221&r2=1.222)
pgsql/src/backend/nodes:
makefuncs.c (r1.56 -> r1.57)
(http://developer.postgresql.org/cvsw...1=1.56&r2=1.57)
pgsql/src/backend/optimizer/util:
clauses.c (r1.248 -> r1.249)
(http://developer.postgresql.org/cvsw...1.248&r2=1.249)
pgsql/src/backend/parser:
parse_coerce.c (r2.156 -> r2.157)
(http://developer.postgresql.org/cvsw...2.156&r2=2.157)
parse_relation.c (r1.127 -> r1.128)
(http://developer.postgresql.org/cvsw...1.127&r2=1.128)
parse_target.c (r1.154 -> r1.155)
(http://developer.postgresql.org/cvsw...1.154&r2=1.155)
pgsql/src/backend/rewrite:
rewriteHandler.c (r1.173 -> r1.174)
(http://developer.postgresql.org/cvsw...1.173&r2=1.174)
rewriteManip.c (r1.104 -> r1.105)
(http://developer.postgresql.org/cvsw...1.104&r2=1.105)
pgsql/src/include/nodes:
makefuncs.h (r1.59 -> r1.60)
(http://developer.postgresql.org/cvsw...1=1.59&r2=1.60)

---------------------------(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
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 11:18 PM.


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