Re: How to make @id or $id as parameter name in plpgsql, is it available?

Lists: pgsql-hackers
From: "Arnold(dot)Zhu" <joint(at)shaucon(dot)com>
To: "pgsql-hackers" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: How to make @id or $id as parameter name in plpgsql, is it available?
Date: 2004-11-24 07:20:30
Message-ID: 20041124071721.7B4C82469@shaucon.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Hello, Michael Fuhr

Thank you very much for your reply, I'm looking for a method to port our application
with .Net and Sql Server 2000 to linux and mono.

Sql server 2000's stored procedure take parameter like @Id, @Name etc. Then in our C#
programs, use @Id, @Name as Select, Insert, Delete, Update commands' parameter name.
I don't want to change our C# source and stored procedure too much. It contains about
50M of C# source files, and more than 1000 stored procedures.

I want to use @id, @name as plpgsql's parameter, then I've no need to change C# source,
only change Npgsql driver not to trim "@" and stored procedure to plpgsql.

Is my description clear enough to express my thought? Waiting for your further replys.

Thanks & Regards!


Arnold.Zhu
2004-11-24


From: "Francisco Figueiredo Jr(dot)" <fxjrlists(at)yahoo(dot)com(dot)br>
To: "Arnold(dot)Zhu" <joint(at)shaucon(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: How to make @id or $id as parameter name in plpgsql,
Date: 2004-11-25 02:15:41
Message-ID: 41A5404D.3030903@yahoo.com.br
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Arnold.Zhu wrote:
| I want to use @id, @name as plpgsql's parameter, then I've no need to
change C# source,
| only change Npgsql driver not to trim "@" and stored procedure to plpgsql.
|

Hi Arnold,

Npgsql already supports parameter names starting with @. This was a
feature users were requesting exactly for the porpose of helping port
code from sql server to postgresql.

Please, let me know of any modifications you may still need to do to get
it working. I did some tests and it were working well.

- --
Regards,

Francisco Figueiredo Jr.
Membro Fundador do Projeto MonoBrasil - MonoBrasil Project Founder Member
http://monobrasil.softwarelivre.org

- -------------
"Science without religion is lame;
religion without science is blind."

~ ~ Albert Einstein
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iQEVAwUBQaVATf7iFmsNzeXfAQLaMAgAgVlHRnr3amZ0kEbocnYp8tiH17fClpHv
L4J/btccMlp/j4pGNiDujLKldXI9EozgzTZ1SyATw+NVTRRJqcDxA74iAfVIxA8n
ucNAXwkeAMg/ko/B93ked6h+sUbHtvojz64osVmB2Uu0VmqBORVhuHYUZhGD+5EV
6iW+1BzIAuY4hVExnL3DxOaqnHs8iFRGj4l5Vns0Vzdq8c11FSAr9AUYDuO8sU4H
TzVnynW56n7lotqo41+ejWU/wTBDgiic8X8ZmYYBe8VB6FZjyPiiwcIhlc3mExkw
UyAIsZZlA1GhUXMWkyLrbSMV1WPa/Bq7mXy/+vtWSZ9eO0iqfOQRhA==
=ha8i
-----END PGP SIGNATURE-----