Question About PostgreSQL Extensibility

Started by Sepideh Eidiover 2 years ago7 messagesgeneral
Jump to latest
#1Sepideh Eidi
eidi@rhf.de

Hi madam/sir,

Our company want to use a database for first time, we select PostgreSQL from a list of open-source Databases. But at first, we want to be sure about something. We have some .net assemblies and in your documents, I didn't find any support for this type of files that is executable in DB or not. Would you please tell me that .net assemblies files are executable in PostgreSQL or not? Or is there any way for calling assembly methods inside DB?

Best regard,

Sepideh Eidi
Software Development

[cid:image001.png@01D9FCE2.F2F39B40]

REILHOFER KG
Zugspitzstraße 5 - <x-apple-data-detectors://1/1> 85757 Karlsfeld - <x-apple-data-detectors://1/1> Germany<x-apple-data-detectors://1/1>
Tel +49 8131 59295 <tel:+49%208131%2059295%200> 72 - Fax +49 8131 97447<tel:+49%208131%2097447>
eidi@rhf.de<mailto:eidi@rhf.de> - www.rhf.de<http://www.rhf.de/&gt;

[cid:image002.png@01D9FCE2.F2F39B40]<https://www.linkedin.com/company/reilhofer-kg/&gt; [cid:image003.png@01D9FCE2.F2F39B40] <https://www.xing.com/companies/reilhoferkg&gt; [cid:image004.png@01D9FCE2.F2F39B40] <https://www.instagram.com/reilhoferkg&gt; [cid:image005.png@01D9FCE2.F2F39B40] <https://www.youtube.com/user/reilhoferkg&gt; [cid:image006.png@01D9FCE2.F2F39B40]

General Manager: Stefan Salvermoser. Registergericht: Amtsgericht München, HRA 65361

Attachments:

image002.pngimage/png; name=image002.pngDownload
image001.pngimage/png; name=image001.pngDownload
image003.pngimage/png; name=image003.pngDownload
image004.pngimage/png; name=image004.pngDownload
image005.pngimage/png; name=image005.pngDownload
image006.pngimage/png; name=image006.pngDownload
#2Laurenz Albe
laurenz.albe@cybertec.at
In reply to: Sepideh Eidi (#1)
Re: Question About PostgreSQL Extensibility

On Thu, 2023-10-12 at 06:09 +0000, Sepideh Eidi wrote:

We have some .net assemblies and in your documents, I didn’t find any support for this
type of files that is executable in DB or not. Would you please tell me that .net
assemblies files are executable in PostgreSQL or not? Or is there any way for calling
assembly methods inside DB?

There is no support for that. I guess somebody could write an extension PL/net,
and it looks like somebody already has: https://github.com/witblitz/pldotnet.
That code ptobably won't work with recent PostgreSQL releases, but it could be
a basis for you to work upon.

My big question for me is: Why on earth would you want to run .NET code inside a
database? Why not run it on the client?

Yours,
Laurenz Albe

#3Ilya Kosmodemiansky
ilya.kosmodemiansky@postgresql-consulting.com
In reply to: Sepideh Eidi (#1)
Re: Question About PostgreSQL Extensibility

Hi Sepideh,

From: Sepideh Eidi <eidi@rhf.de>
Date: Thu, Oct 12, 2023 at 2:35 PM
Subject: Question About PostgreSQL Extensibility
To: pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>

We have some .net assemblies and in your documents, I didn’t find any support for this type of files that is executable in DB or not.

PostgreSQL doesn't support .net assemblies like SQL Server does. In
Postgres you can certainly write stored procedures in different
languages, for example in C, but I am not sure if it would solve your
problem

v. G.,
Ilya

best regards,
Ilya Kosmodemiansky,
CEO, Data Egret GmbH
Herrenstr. 1 A 2,
Spiesen-Elversberg, Germany

#4Chris Travers
chris.travers@gmail.com
In reply to: Ilya Kosmodemiansky (#3)
Re: Question About PostgreSQL Extensibility

On Thu, Oct 12, 2023 at 10:09 PM Ilya Kosmodemiansky <ik@dataegret.com>
wrote:

Hi Sepideh,

From: Sepideh Eidi <eidi@rhf.de>
Date: Thu, Oct 12, 2023 at 2:35 PM
Subject: Question About PostgreSQL Extensibility
To: pgsql-general@lists.postgresql.org <

pgsql-general@lists.postgresql.org>

We have some .net assemblies and in your documents, I didn’t find any

support for this type of files that is executable in DB or not.

PostgreSQL doesn't support .net assemblies like SQL Server does. In
Postgres you can certainly write stored procedures in different
languages, for example in C, but I am not sure if it would solve your
problem

Also if you are self-hosting, you can write and add your own language
handlers. So if you need to support .Net assemblies, this is at least in
theory possible.

Note that there are significant reasons to consider rewriting in other
languages, however. The large one is that .Net prefers a very different
threading model than Postgres and so that's something that has to be solved
(though the Pl/Java folks have solved that problem for Java).

v. G.,
Ilya

best regards,
Ilya Kosmodemiansky,
CEO, Data Egret GmbH
Herrenstr. 1 A 2,
Spiesen-Elversberg, Germany

--
Best Wishes,
Chris Travers

Efficito: Hosted Accounting and ERP. Robust and Flexible. No vendor
lock-in.
http://www.efficito.com/learn_more

#5Noname
felix.quintgz@yahoo.com
In reply to: Laurenz Albe (#2)
Re: Question About PostgreSQL Extensibility

For the same reason that you can use python or perl in postgresql. It's just another language.
I have .net code running on several sql servers and to change the database to postgresql I have to reprogram them.

On Thursday, October 12, 2023 at 09:44:08 AM GMT-4, Laurenz Albe <laurenz.albe@cybertec.at> wrote:

On Thu, 2023-10-12 at 06:09 +0000, Sepideh Eidi wrote:

We have some .net assemblies and in your documents, I didn’t find any support for this
type of files that is executable in DB or not. Would you please tell me that .net
assemblies files are executable in PostgreSQL or not? Or is there any way for calling
assembly methods inside DB?

There is no support for that.  I guess somebody could write an extension PL/net,
and it looks like somebody already has: https://github.com/witblitz/pldotnet.
That code ptobably won't work with recent PostgreSQL releases, but it could be
a basis for you to work upon.

My big question for me is: Why on earth would you want to run .NET code inside a
database?  Why not run it on the client?

Yours,
Laurenz Albe

#6Laurenz Albe
laurenz.albe@cybertec.at
In reply to: Noname (#5)
Re: Question About PostgreSQL Extensibility

On Fri, 2023-10-13 at 13:55 +0000, felix.quintgz@yahoo.com wrote:

For the same reason that you can use python or perl in postgresql. It's just another language.
I have .net code running on several sql servers and to change the database to postgresql I have to reprogram them.

Yes, you'll have to rewrite them.

Yours,
Laurenz Albe

#7Chris Travers
chris.travers@gmail.com
In reply to: Laurenz Albe (#6)
Re: Question About PostgreSQL Extensibility

On Mon, Oct 16, 2023 at 10:59 PM Laurenz Albe <laurenz.albe@cybertec.at>
wrote:

On Fri, 2023-10-13 at 13:55 +0000, felix.quintgz@yahoo.com wrote:

For the same reason that you can use python or perl in postgresql. It's

just another language.

I have .net code running on several sql servers and to change the

database to postgresql I have to reprogram them.

Yes, you'll have to rewrite them.

Or pick up the pldotnet handler and patch it to work on the new version.
My experience forward porting such things is that it is usually trivial.

Of course there may be other reasons to rewrite but it really depends on a
lot of factors.

Yours,
Laurenz Albe

--
Best Wishes,
Chris Travers

Efficito: Hosted Accounting and ERP. Robust and Flexible. No vendor
lock-in.
http://www.efficito.com/learn_more