Skip site navigation (1) Skip section navigation (2)

Re: [HACKERS] Is this a bug? or am I doing some thing wrong?

From: jwieck(at)debis(dot)com (Jan Wieck)
To: terry(at)terrym(dot)com (Terry Mackintosh)
Cc: hackers(at)postgreSQL(dot)org
Subject: Re: [HACKERS] Is this a bug? or am I doing some thing wrong?
Date: 1998-12-21 10:42:38
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
Terry Mackintosh wrote:

> [...]
> shell_connection->                 o.accno = c.accno and
> shell_connection->                 o.stockno = s.stockno;
> ERROR:  DefineQueryRewrite: rule plan string too big.
> shell_connection=>
> Is this a bug? or am I doing some thing wrong?
> And if it is a bug, is it fixed in 6.4.1?

    It's  not a real bug, it's a side effect from the fact that a
    tuple cannot span multiple disk blocks.

> What's a 'rule plan string'? the part I typed? if so, how long can it be?
> I also tried typing it all as one (wraped) line, but same thing.

    First it's wrong. The system stores a  string  representation
    of  the  rules  querytree in pg_rewrite (not the rules plan).
    Anything the rule system deals  with  are  querytrees.  Those
    ones  coming  from  the parser for the actual query and those
    ones generated for the rule  actions  and  qualifications.  A
    querytree consists of cascaded node structures in memory. The
    function nodeToString() builds a string which  is  stored  in
    pg_rewrite  and  stringToNode()  is  used  to  rebuild the in
    memory structures from that.

    These  strings  are  very  explanative  and  thus  very  long
    compared against the query they represent. They must fit into
    one text type attribute and from the  limitation  above,  the
    resulting  pg_rewrite tuple must fit into one (8k by default)
    disk block.

    While fixing  the  rule  system  for  v6.4  I  thought  about
    implementing  continuation  rows for rewrite rules. But there
    are at least ideas out how tuples could eventually span  disk
    blocks  in  the  future,  so  I  left  that problem untouched
    waiting for this general solution.



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

In response to

pgsql-hackers by date

Next:From: Jan WieckDate: 1998-12-21 13:00:34
Subject: Re: [HACKERS] Upgrades for 6.4.1
Previous:From: Oleg BroytmannDate: 1998-12-21 10:24:42
Subject: PostgreSQL 6.4 like bug(?)

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group