Search Postgresql Archives

Re: Create stored procedure from C#.net

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux