Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Pgsql Interfaces Pgadmin Support > bug when creati...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 1 Topic 1984 of 2083
Post > Topic >>

bug when creating/dropping function with a user defiend domain (adds size)

by epm666@[EMAIL PROTECTED] ("epm666") Mar 25, 2008 at 05:34 PM

This is a multipart message in MIME format.

------=_NextPart_000_0071_01C88E9E.75440C70
Content-Type: text/plain;
	charset="us-ascii"
Content-Transfer-Encoding: 7bit

hi when i execute the following script using pgadmin query tool:

 

windows xp, sp2

pgadmin 1.8.2 as installed whith postgres binary 8.3.1

 

 

 

--------------------------------

 

CREATE DOMAIN "dt_0" AS varchar(32)

                NULL;

 

CREATE DOMAIN "dt_1" AS varchar

                NULL;

 

 

 

CREATE FUNCTION "x1" (IN name dt_0, IN description dt_1)

RETURNS integer 

AS $$

SELECT 0;

$$

LANGUAGE SQL

IMMUTABLE

RETURNS NULL ON NULL INPUT;

 

 

---------------------------

 

 

when i look at the function definition using pgadmin it looks like this:

 

-- Function: x1(dt_0(36), dt_1)

 

-- DROP FUNCTION x1(dt_0(36), dt_1);

 

CREATE OR REPLACE FUNCTION x1("name" dt_0(36), description dt_1)

  RETURNS integer AS

$BODY$

SELECT 0;

$BODY$

  LANGUAGE 'sql' IMMUTABLE STRICT

  COST 100;

ALTER FUNCTION x1(dt_0(36), dt_1) OWNER TO postgres;

 

--------------------------

 

if i try to delete it: i get:

 

an error has occured: tyep modifier is not allowed for type "dt_0"

 

why is the (36) there????

 

 

regards

 


------=_NextPart_000_0071_01C88E9E.75440C70
Content-Type: text/html;
	charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

<html xmlns:v=3D"urn:schemas-microsoft-com:vml" =
xmlns:o=3D"urn:schemas-microsoft-com:office:office" =
xmlns:w=3D"urn:schemas-microsoft-com:office:word" =
xmlns:m=3D"http://schemas.microsoft.com/office/2004/12/omml"
=
xmlns=3D"http://www.w3.org/TR/REC-html40">

<head>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Dus-ascii">
<meta name=3DGenerator content=3D"Microsoft Word 12 (filtered medium)">
<style>
<!--
 /* Font Definitions */
 @[EMAIL PROTECTED]
 15 5 2 2 2 4 3 2 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
	{margin:0in;
	margin-bottom:.0001pt;
	font-size:11.0pt;
	font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
	{mso-style-priority:99;
	color:blue;
	text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
	{mso-style-priority:99;
	color:purple;
	text-decoration:underline;}
span.EmailStyle17
	{mso-style-type:personal-compose;
	font-family:"Calibri","sans-serif";
	color:windowtext;}
..MsoChpDefault
	{mso-style-type:ex****t-only;}
@[EMAIL PROTECTED]
 Section1
	{size:8.5in 11.0in;
	margin:1.0in 1.0in 1.0in 1.0in;}
div.Section1
	{page:Section1;}
-->
</style>
<!--[if gte mso 9]><xml>
 <o:shapedefaults v:ext=3D"edit" spidmax=3D"1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
 <o:shapelayout v:ext=3D"edit">
  <o:idmap v:ext=3D"edit" data=3D"1" />
 </o:shapelayout></xml><![endif]-->
</head>

<body lang=3DEN-US link=3Dblue vlink=3Dpurple>

<div class=3DSection1>

<p class=3DMsoNormal>hi when i execute the following script using =
pgadmin query
tool:<o:p></o:p></p>

<p class=3DMsoNormal><o:p>&nbsp;</o:p></p>

<p class=3DMsoNormal>windows xp, sp2<o:p></o:p></p>

<p class=3DMsoNormal>pgadmin 1.8.2 as installed whith postgres binary =
8.3.1<o:p></o:p></p>

<p class=3DMsoNormal><o:p>&nbsp;</o:p></p>

<p class=3DMsoNormal><o:p>&nbsp;</o:p></p>

<p class=3DMsoNormal><o:p>&nbsp;</o:p></p>

<p class=3DMsoNormal>--------------------------------<o:p></o:p></p>

<p class=3DMsoNormal><o:p>&nbsp;</o:p></p>

<p class=3DMsoNormal>CREATE DOMAIN &quot;dt_0&quot; AS =
varchar(32)<o:p></o:p></p>

<p =
class=3DMsoNormal>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; NULL;<o:p></o:p></p>

<p class=3DMsoNormal><o:p>&nbsp;</o:p></p>

<p class=3DMsoNormal>CREATE DOMAIN &quot;dt_1&quot; AS =
varchar<o:p></o:p></p>

<p =
class=3DMsoNormal>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; NULL;<o:p></o:p></p>

<p class=3DMsoNormal><o:p>&nbsp;</o:p></p>

<p class=3DMsoNormal><o:p>&nbsp;</o:p></p>

<p class=3DMsoNormal><o:p>&nbsp;</o:p></p>

<p class=3DMsoNormal>CREATE FUNCTION &quot;x1&quot; (IN name dt_0, IN =
description
dt_1)<o:p></o:p></p>

<p class=3DMsoNormal>RETURNS integer <o:p></o:p></p>

<p class=3DMsoNormal>AS $$<o:p></o:p></p>

<p class=3DMsoNormal>SELECT 0;<o:p></o:p></p>

<p class=3DMsoNormal>$$<o:p></o:p></p>

<p class=3DMsoNormal>LANGUAGE SQL<o:p></o:p></p>

<p class=3DMsoNormal>IMMUTABLE<o:p></o:p></p>

<p class=3DMsoNormal>RETURNS NULL ON NULL INPUT;<o:p></o:p></p>

<p class=3DMsoNormal><o:p>&nbsp;</o:p></p>

<p class=3DMsoNormal><o:p>&nbsp;</o:p></p>

<p class=3DMsoNormal>---------------------------<o:p></o:p></p>

<p class=3DMsoNormal><o:p>&nbsp;</o:p></p>

<p class=3DMsoNormal><o:p>&nbsp;</o:p></p>

<p class=3DMsoNormal>when i look at the function definition using =
pgadmin it
looks like this:<o:p></o:p></p>

<p class=3DMsoNormal><o:p>&nbsp;</o:p></p>

<p class=3DMsoNormal>-- Function: x1(dt_0(36), dt_1)<o:p></o:p></p>

<p class=3DMsoNormal><o:p>&nbsp;</o:p></p>

<p class=3DMsoNormal>-- DROP FUNCTION x1(dt_0(36), dt_1);<o:p></o:p></p>

<p class=3DMsoNormal><o:p>&nbsp;</o:p></p>

<p class=3DMsoNormal>CREATE OR REPLACE FUNCTION x1(&quot;name&quot; =
dt_0(36),
description dt_1)<o:p></o:p></p>

<p class=3DMsoNormal>&nbsp; RETURNS integer AS<o:p></o:p></p>

<p class=3DMsoNormal>$BODY$<o:p></o:p></p>

<p class=3DMsoNormal>SELECT 0;<o:p></o:p></p>

<p class=3DMsoNormal>$BODY$<o:p></o:p></p>

<p class=3DMsoNormal>&nbsp; LANGUAGE 'sql' IMMUTABLE =
STRICT<o:p></o:p></p>

<p class=3DMsoNormal>&nbsp; COST 100;<o:p></o:p></p>

<p class=3DMsoNormal>ALTER FUNCTION x1(dt_0(36), dt_1) OWNER TO =
postgres;<o:p></o:p></p>

<p class=3DMsoNormal><o:p>&nbsp;</o:p></p>

<p class=3DMsoNormal>--------------------------<o:p></o:p></p>

<p class=3DMsoNormal><o:p>&nbsp;</o:p></p>

<p class=3DMsoNormal>if i try to delete it: i get:<o:p></o:p></p>

<p class=3DMsoNormal><o:p>&nbsp;</o:p></p>

<p class=3DMsoNormal>an error has occured: tyep modifier is not allowed =
for type
&quot;dt_0&quot;<o:p></o:p></p>

<p class=3DMsoNormal><o:p>&nbsp;</o:p></p>

<p class=3DMsoNormal>why is the (36) there????<o:p></o:p></p>

<p class=3DMsoNormal><o:p>&nbsp;</o:p></p>

<p class=3DMsoNormal><o:p>&nbsp;</o:p></p>

<p class=3DMsoNormal>regards<o:p></o:p></p>

<p class=3DMsoNormal><o:p>&nbsp;</o:p></p>

</div>

</body>

</html>

------=_NextPart_000_0071_01C88E9E.75440C70--
 




 1 Posts in Topic:
bug when creating/dropping function with a user defiend domain (
epm666@[EMAIL PROTECTED]   2008-03-25 17:34:19 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan13V112 Thu Jul 24 6:53:14 CDT 2008.