Re: [pgadmin-support] Help for Migration

From: <Mamatha_Kagathi_Chan(at)DELL(dot)com>
To: <haramrae(at)gmail(dot)com>
Cc: <ringerc(at)ringerc(dot)id(dot)au>, <pgsql-general(at)postgresql(dot)org>
Subject: Re: [pgadmin-support] Help for Migration
Date: 2011-12-07 09:44:14
Message-ID: 89A978D5BD307B41B174E9250A8D3439082C45@BLRX10HMBAN02.AMER.DELL.COM
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-support pgsql-general

I am using postgres 9.0.4 . I can actually use EXEC in psql which seem to be throwing some error in Craig's case. Also I am able to create procedure and execute them in pgadmin and psql. This piece of code was migrated from Oracle database (MS-SQL to Oracle then Oracle to Postgres). Nevertheless I am able to create independently a procedure also. Only In the ASP environmnet I am facing issue.

Below is the piece of code which I executed in Psql.

edb=# EXEC employeedetailinsert( '529','55','Mamatha','Chandrashekar','0
9','03','9677756894','mamatha_ka(at)dell(dot)com','12/10/2010','','7','Active','','Bang
alore','IG','206','Muralikrishna','TG-DBA','TPDB','TPDB','No','','');

EDB-SPL Procedure successfully completed

-----Original Message-----
From: Alban Hertroys [mailto:haramrae(at)gmail(dot)com]
Sent: Wednesday, December 07, 2011 2:56 PM
To: Chan, Mamatha Kagathi
Cc: ringerc(at)ringerc(dot)id(dot)au; pgsql-general(at)postgresql(dot)org
Subject: Re: [GENERAL] [pgadmin-support] Help for Migration

On 7 December 2011 10:08, <Mamatha_Kagathi_Chan(at)dell(dot)com> wrote:
> The procedure definition is
> CREATE OR REPLACE PROCEDURE

> -- So I am not calling a function but a procedure.

I don't think CREATE PROCEDURE is actually a valid command in Postgres. The 9.0 documentation seems to confirm that (http://www.postgresql.org/docs/9.0/static/sql-commands.html)

In Postgres, "procedures" are void-returning functions - there's no difference. It's just a naming convention.

Perhaps you're using some 3rd party code for MS-SQL compatibility? I imagine CREATE PROCEDURE would then be a simple wrapper around CREATE FUNCTION ... RETURNING void.

Heh, didn't know you could define DEFAULT argument values like that, but it seems you can!
--
If you can't see the forest for the trees, Cut the trees and you'll see there is no forest.

In response to

Responses

Browse pgadmin-support by date

  From Date Subject
Next Message Craig Ringer 2011-12-07 10:06:41 Re: [pgadmin-support] Help for Migration
Previous Message Alban Hertroys 2011-12-07 09:26:22 Re: [pgadmin-support] Help for Migration

Browse pgsql-general by date

  From Date Subject
Next Message Tomas Vondra 2011-12-07 09:45:35 Re: Queries take long long(10 sec.) time running
Previous Message Andre Lopes 2011-12-07 09:27:06 Queries take long long(10 sec.) time running