Re: [HACKERS] Bug report: PL/pgSQL and mixed case table/field names.

From: jwieck(at)debis(dot)com (Jan Wieck)
To: maillist(at)candle(dot)pha(dot)pa(dot)us (Bruce Momjian)
Cc: Bill(dot)Allie(at)mug(dot)org, pgsql-bugs(at)postgreSQL(dot)org, pgsql-hackers(at)postgreSQL(dot)org, jwieck(at)debis(dot)com
Subject: Re: [HACKERS] Bug report: PL/pgSQL and mixed case table/field names.
Date: 1998-12-14 09:33:16
Message-ID: m0zpUNQ-000EBQC@orion.SAPserv.Hamburg.dsh.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Bruce Momjian wrote:

> Can someone comment on this?
>
> > ============================================================================
> > POSTGRESQL BUG REPORT TEMPLATE
> > ============================================================================
> >
> >
> > Your name : Billy G. Allie
> > Your email address : Bill(dot)Allie(at)mug(dot)org
> > [...]
> >
> > Please enter a FULL description of your problem:
> > ------------------------------------------------
> > PL/pgSQL functions will fail to run if a table with a mixed case name is
> > used/referenced.
> >
> >
> > Please describe a way to repeat the problem. Please try to provide a
> > concise reproducible example, if at all possible:
> > ----------------------------------------------------------------------
> > $ psql mug <test.func
> > CREATE FUNCTION "In_Committees" ("int4" ) RETURNS "text" AS '
> > DECLARE
> > committee_rec "Committees"%ROWTYPE;
> > BEGIN
> > SELECT * INTO committee_rec FROM Committees WHERE CommitteeID = $1;
> > IF NOT FOUND THEN
> > RETURN ''FALSE'';
> > END IF;
> > RETURN ''TRUE'';
> > END;' LANGUAGE 'plpgsql';
> > CREATE
> >
> > select "In_Committees" (2);
> > NOTICE: plpgsql: ERROR during compile of In_Committees near line 2
> > ERROR: parse error at or near """
> > EOF
> > $

Sure :-(

PL/pgSQL's scanner/parser does not handle double quoted
syntax for case mixed object names. Not a real bug, just a
lack. Please add to TODO.

Jan

--

#======================================================================#
# 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

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jan Wieck 1998-12-14 09:38:02 Re: [HACKERS] Projecting attributes of function return values
Previous Message Jan Wieck 1998-12-14 09:23:40 Re: [HACKERS] 6.4.1 release