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

Re: No way to have error message on pgadmin III pg 8.0

From: "Laurent Birckel" <laurent(dot)birckel(at)uni-medecine(dot)fr>
To: "Dave Page" <dpage(at)vale-housing(dot)co(dot)uk>,<pgadmin-support(at)postgresql(dot)org>
Subject: Re: No way to have error message on pgadmin III pg 8.0
Date: 2005-03-22 11:35:44
Message-ID: IIEKLKLBOEKJJJCGJHPDIEDDIGAA.laurent.birckel@uni-medecine.fr (view raw or flat)
Thread:
Lists: pgadmin-support
I try to resend this mail (perhaps the attachements are not accepted)
-----Message d'origine-----
De : Laurent Birckel [mailto:laurent(dot)birckel(at)uni-medecine(dot)fr]
Envoyé : lundi 21 mars 2005 18:19
À : Dave Page; pgadmin-support(at)postgresql(dot)org
Objet : RE: [pgadmin-support] No way to have error message on pgadmin III pg
8.0


  I write a function (create function) on pgadmin

  in the text of the function (ie in attachement)



  /*
   Création d'une PJ:
   select fct_addPJ(1,'aa','bb',123,'cc','dd','ee','ff',0)
  */

  CREATE OR REPLACE FUNCTION fct_addPJ(

  _idDOC int4,
  _titrePJ varchar(250),
  _clientFile varchar(255),
  _sizePJ int4,
  _localName varchar(255),
  _localPath varchar(255),
  _fileType varchar(100),
  _fileSubType varchar(100),
  _isDocMetaData int4
  )
    RETURNS int4 AS

  $$
  DECLARE
   _idPJ int4;

  BEGIN
   _idPJ:=0;
   if iddoc <> 0 then
   _idPJ:=fct_getID('PJ');
   if _idPJ <> 0 then


   insert into PJ
   (
    idPJ,
    idDOC,
    titrePJ,
    clientFile,
    sizePJ,
    localName,
    localPath ,
    fileType ,
    fileSubType ,
    isDocMetaData
   )
   values
   (
    _idPJ,
    _idDOC,
    _titrePJ,
    _clientFile,
    _sizePJ,
    _localName,
    _localPath ,
    _fileType ,
    _fileSubType ,
    _isDocMetaData
   );
   end if ;
   RETURN _idPJ;
  END;
  $$

  LANGUAGE plpgsql VOLATILE;



  in the attachement (.txt) , I forgot the [LB] first  END IF

          => I get absolutely NOTHING. ([LB] the "messages" zone is totaly
empty )



  then I can't work. I'm on pg 8.01 on windows. we are 3 developers and
every body tried something. all with the same result.

  I'm realy sad !


  Laurent
    -----Message d'origine-----
    De : Dave Page [mailto:dpage(at)vale-housing(dot)co(dot)uk]
    Envoyé : lundi 21 mars 2005 15:54
    À : Laurent Birckel; pgadmin-support(at)postgresql(dot)org
    Objet : RE: [pgadmin-support] No way to have error message on pgadmin
III pg 8.0


    Hi,

    I can't think of any way to make this happen, unless I'm
misunderstanding what you are doing. Can you supply step by step
instructions to reproduce what you are (ok, aren't!) seeing?

    Regards, Dave.



--------------------------------------------------------------------------
      From: Laurent Birckel [mailto:laurent(dot)birckel(at)uni-medecine(dot)fr]
      Sent: 21 March 2005 08:26
      To: Dave Page; pgadmin-support(at)postgresql(dot)org
      Subject: RE: [pgadmin-support] No way to have error message on pgadmin
III pg 8.0


      Sorry , I searched , but I didn't found any way to display error
messages

      If anybody have an idea, It should be nice

      thanks for help

      Laurent.
        -----Message d'origine-----
        De : pgadmin-support-owner(at)postgresql(dot)org
[mailto:pgadmin-support-owner(at)postgresql(dot)org]De la part de Laurent Birckel
        Envoyé : vendredi 18 mars 2005 18:25
        À : Dave Page; pgadmin-support(at)postgresql(dot)org
        Objet : Re: [pgadmin-support] No way to have error message on
pgadmin III pg 8.0


        Thanks for your answer.

            a validator seems to be set (plpgsql_validator)
            and the validator function exists
                (
        CREATE OR REPLACE FUNCTION plpgsql_validator( oid) RETURNS void AS
        '$libdir/plpgsql', 'plpgsql_validator'
        LANGUAGE 'c' VOLATILE;
                )

            I also tried to call my function (sometimes, when the function
is syntaxcicaly correct but wrong on another way) from another window.
            But unfortunately i get the same kind of result : no messages.
the only way to debug is to add some "return 1 ... return 2 ... to know
approximatively where i'ts wrong.

            not easy !

        thanks again, I search..

        Laurent
          -----Message d'origine-----
          De : Dave Page [mailto:dpage(at)vale-housing(dot)co(dot)uk]
          Envoyé : vendredi 18 mars 2005 18:02
          À : Laurent Birckel; pgadmin-support(at)postgresql(dot)org
          Objet : RE: [pgadmin-support] No way to have error message on
pgadmin III pg 8.0






--------------------------------------------------------------------
            From: pgadmin-support-owner(at)postgresql(dot)org
[mailto:pgadmin-support-owner(at)postgresql(dot)org] On Behalf Of Laurent Birckel
            Sent: 18 March 2005 16:51
            To: pgadmin-support(at)postgresql(dot)org
            Subject: [pgadmin-support] No way to have error message on
pgadmin III pg 8.0


            where working on pgadminIII to writing a function (on windows,
postgre 8.0)

            if I fortget a ";" or a ")" (for all other errors toot,

            I get absolutely nothing when I run the crate or alter function
(F5)

            I just know that there is an error because I don't have the
message "query exucuted ...", but th'ats all

            I think I tried everything , but no way to have the error
messages like "syntax error at line N"

          Unfortunately PostgreSQL doesn't validate most functions when they
are created. pl/pgsql does have a basic validator, but it is possible it is
not enabled, check it's properties in pgAdmin and ensure a validator is
listed. Either way, it is far from perfect, and the best option I find is to
have a test query or queries setup in another window ready to run as soon as
you've updated the function. That will show you where any errors are found.

          Regards, Dave.

pgadmin-support by date

Next:From: Dave PageDate: 2005-03-22 13:44:41
Subject: Re: No way to have error message on pgadmin III pg 8.0
Previous:From: Yogesh GehaniDate: 2005-03-22 05:07:28
Subject: Support reqd.

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