Re: [SQL] RewriteDefine.c : Rule size - Mailing list pgsql-sql

From wieck@debis.com (Jan Wieck)
Subject Re: [SQL] RewriteDefine.c : Rule size
Date
Msg-id m112H3w-0003ktC@orion.SAPserv.Hamburg.dsh.de
Whole thread Raw
In response to RewriteDefine.c : Rule size  (Olivier Ertz <ertz@illite.u-strasbg.fr>)
Responses Re: [SQL] RewriteDefine.c : Rule size  (Jim Rowan <jmr@computing.com>)
Re: [SQL] RewriteDefine.c : Rule size  (Jim Rowan <jmr@computing.com>)
List pgsql-sql
>
> Hello,
>
>    I'm using Postgres 6.4.2.
> I want to create a view, but a message appear :
>  ERROR:  DefineQueryRewrite: rule plan string too big.
> What could be the solution to avoid the problem? In fact, I have 31
> columns in a table, and i want to make a view on this table (with
> a line restrict = WHERE clause).

    That's a well known, long standing problem which is still not
    fixed in v6.5.  I'm planning to fix it for v6.6 - though that
    doesn't help you.

> I watched the RewriteDefine.c code and saw :
>  #define RULE_PLAN_SIZE BLCKSZ
> I thought changing the value of this size, but I don't find the
> place to modify the BLCKSZ value.
> But, before doing the modification and recompile, I would like to
> have your opinion on the problem...perhaps is there an easier way to
> resolve the problem.

    Never  did it, but the BLCKSZ is defined in include/config.h.
    That is a file generated from  config.h.in,  so  be  sure  to
    change it there and reconfigure before recompiling.

    And  if you change the blocksize, be sure to run initdb after
    because your databases will  not  be  binary  compatible  any
    more!


Jan

--

#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me.                                  #
#========================================= wieck@debis.com (Jan Wieck) #

pgsql-sql by date:

Previous
From: Olivier Ertz
Date:
Subject: RewriteDefine.c : Rule size
Next
From: Bruce Lowery
Date:
Subject: uncorrelated subqueries