Re: plpgsql and rowtypes

From: Dave Trombley <dtrom(at)bumba(dot)net>
To: Dave Trombley <dtrom(at)bumba(dot)net>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-general(at)postgresql(dot)org
Subject: Re: plpgsql and rowtypes
Date: 2002-01-02 05:51:36
Message-ID: 3C329FE8.40301@bumba.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Dave Trombley wrote:

> I'm using the current release version (7.1.3), downloaded and
> compiled it today after having this problem. I'm going to try it
> again on a fresh box, in case something funcky is going on with
> library versions, etc.
>
Ok, yeah, now I'm pretty sure I'm not insane. Well, maybe not /so/
sure. =) But, I've messed up pl_exec.c to dump some information about
the branches it's taking in an IF statement. It seems that the false
body part in the PLpgSQL_stmt_if structure is not being set correctly in
a IF-THEN-ELSIF-ELSE (same example as before):

test=# select itet(7);
Evaluating condition (SELECT $1 = 4)...
Exec'ing false part...
False part statements: 64 allocated, 1 actually used.
False part statement 0: cmdtype 9, line 4
itet
------
f
(1 row)

The command type is correct for that line, but the line number
itself is incorrect, line 4 is the ELSE part, not the ELSIF. Looking at
the version of the source I have, the grammar seems to be old, version
1.17 of gram.y. The CVS log tells me that this is exactly one version
before ELSIF support was added, but it seems oddball that I wouldn't be
griped at for putting some random words into my function (namely ELSIF).
I'd persue it further, but frankly yacc/bison tends to give me
migraines, and I'm still reeling somewhat from the new year's party... =)

Any idea why I have this older version? I don't know when the
releases were made, but the same file is in 7.1.2 and 7.1.1. 7.1 has a
single minor revision earlier. (Or is the documentation just ahead of
the releases?) I guess I'll just go grab the CVS sources and mess
around with those for now.

Cheers,
dj trombley
<dtrom(at)bumba(dot)net>

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message William WAISSE 2002-01-02 10:54:31 Re: libpq: possible to get list of tables, fields, and types?
Previous Message Tom Lane 2002-01-02 05:20:39 Re: plpgsql and rowtypes