pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: David Johnston <polobo@yahoo.com>
To: pgsql-bugs@postgresql.org
Subject: Re: BUG #7784: trouble with pl ERROR: missing FROM-clause entry for table
Date: Thu, 3 Jan 2013 17:30:21 -0800 (PST)
Message-ID: <1357263021085-5738698.post@n5.nabble.com> (raw)
In-Reply-To: <E1TqpOk-0007By-DS@wrigleys.postgresql.org>
References: <E1TqpOk-0007By-DS@wrigleys.postgresql.org>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>

smatiz wrote
> The following bug has been logged on the website:
> 
> Bug reference:      7784
> Logged by:          Santiago Matiz Vasquez
> Email address:      

> smatiz@

> PostgreSQL version: 9.2.2
> Operating system:   MAC LION 10.7.4
> Description:        
> 
> 
> CREATE OR REPLACE FUNCTION financiero.marchar(pidproducto int,pcant
> int,pnrocuenta int,pcedula character varying(20)) RETURNS character
> varying(100) AS $$
> 
> result:
> ERROR:  missing FROM-clause entry for table "valores"
> LINE 1: SELECT valores.iva
>                ^
> QUERY:  SELECT valores.iva
> CONTEXT:  PL/pgSQL function
> financiero.marchar(integer,integer,integer,character varying) line 31 at
> RAISE

From what I can infer from my reading the function you shown here should
work.

As the example is not self-contained it is difficult to prove whether it is
indeed correct or not.  The error indicates that the statement "SELECT
valores.iva" was attempted somewhere but that exact construct is not present
in the function shown.  I am also not sure exactly where line "31" is in the
supplied code.

I suggest two steps to move along further:

First, make sure that you are executing the function that you think you are. 
Search path issues may have cropped up somewhere and a previous, invalid,
version may still be sitting around somewhere.

Next (if necessary), try to narrow down, keep, and point out only the
offending code and whatever is minimally necessary to make it execute.

Unless the example provided is self-contained simply putting out the entire
code without any commentary makes it more difficult for people to provide
help.

David J.




--
View this message in context: http://postgresql.1045698.n5.nabble.com/BUG-7784-trouble-with-pl-ERROR-missing-FROM-clause-entry-for...
Sent from the PostgreSQL - bugs mailing list archive at Nabble.com.


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



view thread (3+ messages)  latest in thread

Message-ID: <1357263021085-5738698.post@n5.nabble.com>
Permalink:  ../1357263021085-5738698.post@n5.nabble.com/
Also on:    postgresql.org/message-id/1357263021085-5738698.post@n5.nabble.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: polobo@yahoo.com
  Subject: Re: BUG #7784: trouble with pl ERROR: missing FROM-clause entry for table
  In-Reply-To: <1357263021085-5738698.post@n5.nabble.com>
  References: <E1TqpOk-0007By-DS@wrigleys.postgresql.org> <1357263021085-5738698.post@n5.nabble.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox