postgresuser wrote:
I am using PostgreSql 8.3 version. I want to create stored procedure from
C#.net. Is it possible? Any idea.

You probably don't mean something like:

using Npgsql;
...
using (NpgsqlConnection connection = new NpgsqlConnection("Server=127.0.0.1;Database=postgres;Integrated Security=true;"))
{
    string createFunctionCommand = @"
CREATE OR REPLACE FUNCTION my_cool_function() RETURNS integer AS
$BODY$
select 42;
$BODY$
LANGUAGE sql IMMUTABLE;
";
NpgsqlCommand command = new NpgsqlCommand(createFunctionCommand, connection);
    connection.Open();
    command.ExecuteNonQuery();
    connection.Close();
}

Something like PL/C# to write functions in C# doesn't exist.

Regards,

Brar



--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

Reply via email to