This function doesn't shown in pgAdmin III, but does in pgAdmin II

Поиск
Список
Период
Сортировка
Искать

This function doesn't shown in pgAdmin III, but does in pgAdmin II

От:
"Dieter Fischer" <dieter.fischer@grid-it.ch>
Дата:
Hello

This is what I get in Version 3:


-- Function: cobra.code_gebiet(varchar, int4, int4, int4)

-- DROP FUNCTION cobra.code_gebiet(varchar, int4, int4, int4);

CREATE OR REPLACE FUNCTION cobra.code_gebiet(varchar, int4, int4, int4) RETURNS varchar AS
'' LANGUAGE 'plpgsql' VOLATILE;


in Version 2 I get this (which is correct and also in the PG_DUMP):


Create Or Replace Function cobra.code_gebiet(varchar,int4,int4,int4)
Returns varchar As '

--
************************************************************************
******
-- Ver    Datum       Autor  Änderung
-- -----  ----------  -----  ------------------------------------
-- 1.0    017.03.20023 df     Erstellt
--
************************************************************************
******
-- Beschreibung:
--
-- Holt den Code aus der Code-Tabelle. Falls die Sprache nicht existiert
ist der
-- Fallback Deutsch. Wenn auch Deutsch nicht existiert --> Fehler
--
************************************************************************
******
DECLARE  gebiet_i	ALIAS FOR $1;  code_i	ALIAS FOR $2;  spr_i	ALIAS FOR $3;  short_i	ALIAS FOR $4;
  bez_		codetext.bez%TYPE;  kbez_	codetext.kbez%TYPE;  --  true_	CONSTANT INTEGER  := 1;  false_	CONSTANT INTEGER  := 0;  errm_	VARCHAR(2000);
BEGIN  SELECT	cote.kbez,	cote.bez  INTO		kbez_,		bez_  FROM		codetext_v	cote,   	code_v		code  WHERE	code.gebiet   = UPPER(gebiet_i)  AND		code.code     = code_i  AND		cote.code_seq = code.code_seq  AND		cote.spr_code = spr_i;
  IF short_i = true_ THEN     RETURN(kbez_);  ELSE     RETURN(bez_);  END IF;
  IF NOT FOUND THEN  -- If nothing was returned in the last query     SELECT	cote.kbez,	cote.bez     INTO	kbez_,		bez_     FROM	codetext_v	cote,	code_v		code     WHERE	code.gebiet   = UPPER(gebiet_i)     AND	code.code     = code_i     AND	cote.code_seq = code.code_seq     AND	cote.spr_code = 1;        -- Fix Deutsch
     IF NOT FOUND THEN  -- If nothing was returned in the last query        errm_ := ''code_sprache: Code not found, GEBIET=''||                  gebiet_||'', CODE=''||code_i;        RETURN(errm_);     ELSE        IF short_i = true_ THEN    RETURN(kbez_); ELSE    RETURN(bez_); END IF;     END IF;
  END IF;

END;
'
Language 'plpgsql';


Any ideas?

Versions:

PgAdmin III:	1.0.0
PostgreSQL:		7.3.3

Regards

Dieter


Re: This function doesn't shown in pgAdmin III, but does in pgAdmin II

От:
"Dave Page" <dpage@vale-housing.co.uk>
Дата:
Hi Dieter,

Can you try the latest snapshot from http://snake.pgadmin.org/snapshots/win32 please? It looks OK here using CVS tip.

Regards, Dave.

> -----Original Message-----
> From: Dieter Fischer [mailto:dieter.fischer@grid-it.ch] 
> Sent: 03 November 2003 17:34
> To: pgadmin-support@postgresql.org
> Subject: [pgadmin-support] This function doesn't shown in 
> pgAdmin III, but does in pgAdmin II
> 
> Hello
> 
> This is what I get in Version 3:
> 
> 
> -- Function: cobra.code_gebiet(varchar, int4, int4, int4)
> 
> -- DROP FUNCTION cobra.code_gebiet(varchar, int4, int4, int4);
> 
> CREATE OR REPLACE FUNCTION cobra.code_gebiet(varchar, int4, 
> int4, int4)
>   RETURNS varchar AS
> ''
>   LANGUAGE 'plpgsql' VOLATILE;
> 
> 
> in Version 2 I get this (which is correct and also in the PG_DUMP):
> 
> 
> Create Or Replace Function cobra.code_gebiet(varchar,int4,int4,int4)
> Returns varchar As '
> 
> --
> **************************************************************
> **********
> ******
> -- Ver    Datum       Autor  Änderung
> -- -----  ----------  -----  ------------------------------------
> -- 1.0    017.03.20023 df     Erstellt
> --
> **************************************************************
> **********
> ******
> -- Beschreibung:
> --
> -- Holt den Code aus der Code-Tabelle. Falls die Sprache 
> nicht existiert ist der
> -- Fallback Deutsch. Wenn auch Deutsch nicht existiert --> Fehler
> --
> **************************************************************
> **********
> ******
> DECLARE
>    gebiet_i	ALIAS FOR $1;
>    code_i	ALIAS FOR $2;
>    spr_i	ALIAS FOR $3;
>    short_i	ALIAS FOR $4;
> 
>    bez_		codetext.bez%TYPE;
>    kbez_	codetext.kbez%TYPE;
>    --
>    true_	CONSTANT INTEGER  := 1;
>    false_	CONSTANT INTEGER  := 0;
>    errm_	VARCHAR(2000);
> BEGIN
>    SELECT	cote.kbez,	cote.bez
>    INTO		kbez_,		bez_
>    FROM		codetext_v	cote,
> 	   	code_v		code
>    WHERE	code.gebiet   = UPPER(gebiet_i)
>    AND		code.code     = code_i
>    AND		cote.code_seq = code.code_seq
>    AND		cote.spr_code = spr_i;
> 
>    IF short_i = true_ THEN
>       RETURN(kbez_);
>    ELSE
>       RETURN(bez_);
>    END IF;
> 
>    IF NOT FOUND THEN  -- If nothing was returned in the last query
>       SELECT	cote.kbez,	cote.bez
>       INTO	kbez_,		bez_
>       FROM	codetext_v	cote,
> 		code_v		code
>       WHERE	code.gebiet   = UPPER(gebiet_i)
>       AND	code.code     = code_i
>       AND	cote.code_seq = code.code_seq
>       AND	cote.spr_code = 1;        -- Fix Deutsch
> 
>       IF NOT FOUND THEN  -- If nothing was returned in the last query
>          errm_ := ''code_sprache: Code not found, GEBIET=''||
>                    gebiet_||'', CODE=''||code_i;
>          RETURN(errm_);
>       ELSE
>          IF short_i = true_ THEN
> 	    RETURN(kbez_);
> 	 ELSE
> 	    RETURN(bez_);
> 	 END IF;
>       END IF;
> 
>    END IF;
> 
> END;
> '
> Language 'plpgsql';
> 
> 
> Any ideas?
> 
> Versions:
> 
> PgAdmin III:	1.0.0
> PostgreSQL:		7.3.3
> 
> Regards
> 
> Dieter
> 
> 
> ---------------------------(end of 
> broadcast)---------------------------
> TIP 2: you can get off all lists at once with the unregister command
>     (send "unregister YourEmailAddressHere" to 
> majordomo@postgresql.org)
> 

FAQ