X-Original-To: pgsql-odbc-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id 963F89DC810 for ; Mon, 9 Jan 2006 11:04:58 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 81495-07 for ; Mon, 9 Jan 2006 11:05:02 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from gk-us2.us.michelin.com (gk-us2.michelin.com [156.65.14.19]) by postgresql.org (Postfix) with ESMTP id 9AAF19DC806 for ; Mon, 9 Jan 2006 11:04:55 -0400 (AST) Received: from oncpfxp3-out.onc.michelin.com (unverified [10.21.4.30]) by gk-us2.us.michelin.com (Clearswift SMTPRS 5.1.7) with ESMTP id for ; Mon, 9 Jan 2006 09:54:42 -0500 Received: from ONCMH1.onc.michelin.com (ONCMH1.onc.michelin.com [156.65.124.40]) by oncpfxp3-out.onc.michelin.com (Postfix) with ESMTP id 722101E98D for ; Mon, 9 Jan 2006 09:33:14 -0500 (EST) Received: from oncmtap1.onc.michelin.com by oncmh1.onc.michelin.com with ESMTP for pgsql-odbc@postgresql.org; Mon, 9 Jan 2006 09:33:14 -0500 Received: from oncems01.onc.michelin.com ([156.65.125.150]) by oncmtap1.onc.michelin.com (Netscape Messaging Server 4.15) with ESMTP id ISTXRD00.R31 for ; Mon, 9 Jan 2006 09:33:13 -0500 Received: from [10.43.12.183] (unverified) by oncems01.onc.michelin.com (Content Technologies SMTPRS 4.2.5) with ESMTP id for ; Mon, 9 Jan 2006 09:33:13 -0500 Message-Id: <43C27427.5070708@us.michelin.com> Date: Mon, 09 Jan 2006 09:33:11 -0500 From: "Campbell, Greg" User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.7) Gecko/20050414 X-Accept-Language: en-us, en MIME-Version: 1.0 To: pgsql-odbc@postgresql.org Subject: Re: Difference References: <002201c614e4$8e220110$1502010a@aarnbee.com> In-Reply-To: <002201c614e4$8e220110$1502010a@aarnbee.com> Content-Type: multipart/mixed; boundary="------------020108070203090506040200" X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=2.491 required=5 tests=[AWL=-0.252, RCVD_IN_WHOIS_INVALID=2.151, UNPARSEABLE_RELAY=0.001, UPPERCASE_50_75=0.591] X-Spam-Score: 2.491 X-Spam-Level: ** X-Archive-Number: 200601/79 X-Sequence-Number: 6894 This is a multi-part message in MIME format. --------------020108070203090506040200 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Is this an ODBC question? This might be a better question for the pgsql-general mailing list. That said, perhaps you should use pgAdmin to cut the definition out of 7.4 database, and apply it to the 8.0 database. Minal A. Aryamane wrote: > Can anyone tell me why the same function tried on POSTGRESQL 7.4 works but does nor work on POSTGRESQL 8.0. Is there any difference in the way POSTGRES handles functions in version 8.0 > > CREATE OR REPLACE FUNCTION sp_delete_course() > RETURNS text AS > ' > Declare > COURSEID VARCHAR(20); > NEWCOURSEID VARCHAR(20); > SET NEWCOURSEID = ''ARC'' + COURSEID; > > INSERT INTO ARCHIVE_ETL..COURSEMASTER SELECT * FROM COURSEMASTER WHERE COURSEID = COURSEID; > INSERT INTO ARCHIVE_ETL..TOPICS SELECT * FROM TOPICS WHERE COURSEID = COURSEID; > INSERT INTO ARCHIVE_ETL..COURSESENROLLED SELECT * FROM COURSESENROLLED WHERE COURSEID = COURSEID; > INSERT INTO ARCHIVE_ETL..SKILLS SELECT * FROM SKILLS WHERE COURSEID = COURSEID; > INSERT INTO ARCHIVE_ETL..REGISTER SELECT R.ID,R.STUDENTID,R.FNAME,R.MNAME,R.LNAME,R.ADDRESS,R.CITY,R.STATE,R.PINCODE,R.TEL,R.EMAIL,R.DOB,R.SEX,R.RELIGION,R.NATIONALITY,R.LANGUAGEK,R.PROFESSION,R.QUALIFICATION,R.EXPERIENCE,R.COMPANYNAME,R.SPECIALITY,R.PASSWORD,R.ENROLLDATE,R.CARDID FROM REGISTER R INNER JOIN COURSESENROLLED C ON R.STUDENTID=C.STUDENTID AND R.FNAME=C.STUDENTNAME WHERE C.COURSEID=COURSEID > INSERT INTO ARCHIVE_ETL..TRAINERMASTER SELECT T.INSTRUCTORID,T.TITE,T.FIRSTNAME,T.LASTNAME,T.DESIGNATION,T.QUALIFICATION,T.ADDRESS,T.TEL,T.EMAILID,T.PASSWORD FROM TRAINERMASTER T INNER JOIN SKILLS S ON T.INSTRUCTORID=S.INSTRUCTORID WHERE S.COURSEID = COURSEID > UPDATE ARCHIVE_ETL..COURSEMASTER SET COURSEID = NEWCOURSEID WHERE COURSEID = COURSEID > UPDATE ARCHIVE_ETL..TOPICS SET COURSEID = NEWCOURSEID WHERE COURSEID = COURSEID > UPDATE ARCHIVE_ETL..COURSESENROLLED SET COURSEID = NEWCOURSEID WHERE COURSEID = COURSEID > UPDATE ARCHIVE_ETL..SKILLS SET COURSEID = NEWCOURSEID WHERE COURSEID = COURSEID > DELETE COURSEMASTER WHERE COURSEID = COURSEID > DELETE TOPICS WHERE COURSEID = COURSEID > DELETE COURSESENROLLED WHERE COURSEID = COURSEID > DELETE SKILLS WHERE COURSEID = COURSEID > ' > LANGUAGE 'plpgsql' VOLATILE; > > I get the following error... > ERROR: type "newcourseid" does not exist > CONTEXT: compile of PL/pgSQL function "sp_delete_course" near line 4 > > > > --------------020108070203090506040200 Content-Type: text/x-vcard; charset=utf-8; name="greg.campbell.vcf" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="greg.campbell.vcf" begin:vcard fn:Greg Campbell n:Campbell;Greg org:Michelin North America - US5 Lexington;ENG-ASE email;internet:greg.campbell@us.michelin.com title:ASE Systems Engineer tel;work:803-951-5561/x75561 x-mozilla-html:FALSE version:2.1 end:vcard --------------020108070203090506040200--