From: | "Dieter Fischer" <dieter(dot)fischer(at)grid-it(dot)ch> |
---|---|
To: | <pgadmin-support(at)postgresql(dot)org> |
Subject: | This function doesn't shown in pgAdmin III, but does in pgAdmin II |
Date: | 2003-11-03 17:33:39 |
Message-ID: | NDBBJMINGKMICGFKFEPJAEBEDKAA.dieter.fischer@grid-it.ch |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgadmin-support |
Hello
This is what I get in Version 3:
<SNIP>
-- 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;
</SNIP>
in Version 2 I get this (which is correct and also in the PG_DUMP):
<SNIP>
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';
</SNIP>
Any ideas?
Versions:
PgAdmin III: 1.0.0
PostgreSQL: 7.3.3
Regards
Dieter
From | Date | Subject | |
---|---|---|---|
Next Message | blacknoz | 2003-11-03 18:09:27 | Re: Mac OS X |
Previous Message | Adam H. Pendleton | 2003-11-03 17:19:09 | Re: Mac OS X |