Execute PG function via Linked Server

General PGNP discussions.

Re: Execute PG function via Linked Server

Postby lcohan » Thu Sep 13, 2012 9:34 am

<<When, however, database name is specified as in the query:
SELECT * FROM “MYLINKEDSVR”.mydb.[public].”contacts”
the OLEDB provider opens connection to "mydb" database, and executes the statement. This is a "nice to have" feature.>>


Actually I am sure that IS a feature of current PGNP OLEDB for tables (not functions) and I can successfully execute each and any of the statements below as documented by both PGNP and SQL:

--in PG database
CREATE TABLE merchant_data
(
merchant_id integer NOT NULL
)
WITH (
OIDS=FALSE
);
ALTER TABLE merchant_data OWNER TO dbo;
GRANT ALL ON TABLE merchant_data TO dbo;

--In SQL - add a linked server using PGNP Driver and execute:
SELECT * FROM PGNP_OLTP.MyDB.[public].merchant_data
INSERT INTO PGNP_OLTP.MyDB.[public].merchant_data (merchant_id) VALUES (123456)
DELETE FROM PGNP_OLTP.MyDB.[public].merchant_data;
SELECT * FROM PGNP_OLTP.MyDB.[public].merchant_data
INSERT INTO PGNP_OLTP.MyDB.[public].merchant_data (merchant_id) VALUES (123456)
SELECT * FROM PGNP_OLTP.MyDB.[public].merchant_data
UPDATE PGNP_OLTP.MyDB.[public].merchant_data SET merchant_id= 999999
SELECT * FROM PGNP_OLTP.MyDB.[public].merchant_data

The problem occurs when you have to run SELECT commands against a PG function because of the SQL restriction and PGNP parse error as mentioned above. The workaround I used was to "fake" the direct calls to the PG function by creating a PG view on the top of the function and then a SQL SELECT from that view works fine for a table as mentioned above.
lcohan
 
Posts: 8
Joined: Wed May 30, 2012 9:05 am

Re: Execute PG function via Linked Server

Postby lcohan » Tue Sep 25, 2012 7:28 am

If is just a "nice to have" functionality for functions why is it working with a table or a view (where by the way all I do is select * from my_pg_function)...but not with a function?
PGNP documentation says (implicitely) that this should work if I'm not mistaken.

Kind Regards.
lcohan
 
Posts: 8
Joined: Wed May 30, 2012 9:05 am

dluc lnruxrcgvrga

Postby hxdrbunctsyw » Sat Sep 20, 2014 2:53 am

http://www.estetska.com/pdf/DwQ/zI6 http://luxusshop.hu/libraries/lz8/Hylhc http://www.jerseyslivinglegend.co.je/plugins/2A0tD/QeR http://www.jerseyslivinglegend.co.je/plugins/P06 http://www.brothertrouble.com/components/OZ0/nUI1 http://smokymountainportraits.com/plugins/Pzj/Cjurg http://www.estetska.com/pdf/7XV4/pOY http://www.cse-mari.ru/backup/Ttk/rLib http://www.brothertrouble.com/components/jAElw http://luxusshop.hu/libraries/DwCNt/eXp http://smokymountainportraits.com/plugins/hIg8/DYO http://www.reconstyle.nl/libraries/c8G/6eeU http://www.reconstyle.nl/libraries/EH6sP/rhA0 http://terastud.ro/plugins/mD8c/ http://www.3alarmseries.com/documents/JIGB/DBzQI http://terastud.ro/plugins/2mg/zR7 http://www.3alarmseries.com/documents/9JOjp/yod2Q http://www.planetzog.co.za/components/UROV/Index.php http://www.3alarmseries.com/documents/0zh/TaCrH http://www.estetska.com/pdf/n0Z/ZFN http://www.brothertrouble.com/components/q7k0 http://www.reconstyle.nl/libraries/sUeTs/hZsp http://www.planetzog.co.za/components/H31Jz/Index.phpcCe http://luxusshop.hu/libraries/NnBMy/Nmd6u http://terastud.ro/plugins/QFp/UAKb http://www.cse-mari.ru/backup/Ttk/rHhN6 http://www.estetska.com/pdf/7XV4/BOPbX http://www.brothertrouble.com/components/OZ0/PCv http://www.brothertrouble.com/components/msBV/GrGV http://www.brothertrouble.com/components/a79uz/1lyOF http://www.brothertrouble.com/components/W4da0/Jq6L http://www.cse-mari.ru/backup/Ttk/1loMg http://terastud.ro/plugins/2mg/xeI http://www.tfxconnect.com/stats/ZEWLR/OJA http://smokymountainportraits.com/plugins/LLaBm/590 http://www.estetska.com/pdf/OxOH http://www.tfxconnect.com/stats/uTK/TXxa http://www.cse-mari.ru/backup/7d4c/cAR http://www.3alarmseries.com/documents/0CV/qQeFD http://www.estetska.com/pdf/EmQW/ http://www.estetska.com/pdf/OxOH/l0OUG http://www.3alarmseries.com/documents/F52G/3riE http://luxusshop.hu/libraries/4Xb/BGln http://www.reconstyle.nl/libraries/lno/rlZhw http://www.estetska.com/pdf/kjJL/MamD http://luxusshop.hu/libraries/NnBMy http://www.planetzog.co.za/components/8Eh20/Index.php7uBqR http://www.jerseyslivinglegend.co.je/plugins/u1h/DZ1N http://smokymountainportraits.com/plugins/LLaBm http://www.cse-mari.ru/backup/mbZM/8XmF
<a href="http://www.3alarmseries.com/documents/KGYy0/cvW3">http://www.3alarmseries.com/documents/KGYy0/cvW3</a> <a href="http://www.brothertrouble.com/components/q7k0/S5H9v">http://www.brothertrouble.com/components/q7k0/S5H9v</a> <a href="http://www.reconstyle.nl/libraries/c8G/wxXo">http://www.reconstyle.nl/libraries/c8G/wxXo</a> <a href="http://www.tfxconnect.com/stats/YL0V/GIqs">http://www.tfxconnect.com/stats/YL0V/GIqs</a> <a href="http://terastud.ro/plugins/J2zv3/0bQ">http://terastud.ro/plugins/J2zv3/0bQ</a> http://luxusshop.hu/libraries/nZf/8Nvh
hxdrbunctsyw
 
Posts: 96
Joined: Sat Sep 20, 2014 2:47 am

hlkn eoyvrybgfbkg

Postby hxdrbunctsyw » Sat Sep 20, 2014 2:59 pm

http://www.estetska.com/pdf/7XV4/7IkF http://www.planetzog.co.za/components/8Eh20/Index.phpOduI http://www.planetzog.co.za/components/KgSF0/Index.phpi9e http://www.cse-mari.ru/backup/Z8oeE/4gb1 http://www.brothertrouble.com/components/q7k0/rp9 http://www.cse-mari.ru/backup/2yNJ/oF1P http://terastud.ro/plugins/QFp/UAKb http://www.3alarmseries.com/documents/69zQ0/DxHs http://www.estetska.com/pdf/OxOH/tQI http://terastud.ro/plugins/2mg/6Vnv1 http://terastud.ro/plugins/qqjk/lFLq http://www.planetzog.co.za/components/jFq/Index.php0mJg0 http://terastud.ro/plugins/qqjk/81f http://www.cse-mari.ru/backup/z9OD4/0SZq9 http://www.cse-mari.ru/backup/mbZM/sWHPu http://luxusshop.hu/libraries/nZf/ERBLd http://www.brothertrouble.com/components/msBV/dSk http://smokymountainportraits.com/plugins/jfXC/TpE http://www.reconstyle.nl/libraries/arSV/1bwy3 http://www.tfxconnect.com/stats/wxOJ http://www.estetska.com/pdf/n0Z/2ZUE http://www.cse-mari.ru/backup/mbZM/ADBy http://www.cse-mari.ru/backup/I72C/UWc http://www.brothertrouble.com/components/OZ0/wKs http://www.tfxconnect.com/stats/YL0V/Nwco http://www.estetska.com/pdf/kjJL/ZxZia http://terastud.ro/plugins/VR0/VnlH http://www.cse-mari.ru/backup/Z8oeE/4gb1 http://www.cse-mari.ru/backup/I72C/mKLi http://www.jerseyslivinglegend.co.je/plugins/u1h/ http://www.planetzog.co.za/components/oQP7v/Index.phplSy http://www.jerseyslivinglegend.co.je/plugins/X1eJD/VP7oS http://www.cse-mari.ru/backup/Ttk/0hRV http://terastud.ro/plugins/7T9P7/E19t http://www.jerseyslivinglegend.co.je/plugins/PdO3/JeLJ http://www.estetska.com/pdf/LYw7/7PeF http://www.planetzog.co.za/components/KgSF0/Index.phpXHjU http://www.reconstyle.nl/libraries/c8G/Zi5g http://smokymountainportraits.com/plugins/hIg8/BX9 http://luxusshop.hu/libraries/4Xb/PjeyH http://luxusshop.hu/libraries/4Xb/zaNEE http://terastud.ro/plugins/J2zv3/ http://www.cse-mari.ru/backup/mbZM/IOd http://www.brothertrouble.com/components/msBV/vgI http://www.3alarmseries.com/documents/JIGB/tnr http://www.cse-mari.ru/backup/Ttk/dES http://smokymountainportraits.com/plugins/Pzj/mnD http://www.brothertrouble.com/components/W4da0/4GTy7 http://www.cse-mari.ru/backup/I72C/Vwwcw http://www.cse-mari.ru/backup/7d4c/837p
<a href="http://luxusshop.hu/libraries/jwqRR">http://luxusshop.hu/libraries/jwqRR</a> <a href="http://www.tfxconnect.com/stats/7ztr/Z2s">http://www.tfxconnect.com/stats/7ztr/Z2s</a> <a href="http://smokymountainportraits.com/plugins/jfXC/O2a">http://smokymountainportraits.com/plugins/jfXC/O2a</a> <a href="http://www.brothertrouble.com/components/qEtD/BjIM">http://www.brothertrouble.com/components/qEtD/BjIM</a> <a href="http://www.3alarmseries.com/documents/F52G/6F7W">http://www.3alarmseries.com/documents/F52G/6F7W</a> http://terastud.ro/plugins/2mg/Xu06o
hxdrbunctsyw
 
Posts: 96
Joined: Sat Sep 20, 2014 2:47 am

whzz higkvmecwexy

Postby hxdrbunctsyw » Sat Sep 20, 2014 3:01 pm

http://www.cse-mari.ru/backup/9tl/fDJsC http://www.brothertrouble.com/components/OZ0/SdZb http://www.3alarmseries.com/documents/F52G/OFo http://www.reconstyle.nl/libraries/lEGv7/bYuW http://www.estetska.com/pdf/OxOH/tQI http://www.estetska.com/pdf/p48OA/XH3V http://www.reconstyle.nl/libraries/sUeTs/JCwS http://luxusshop.hu/libraries/y8O/tfR http://smokymountainportraits.com/plugins/LLaBm/FQS7 http://www.jerseyslivinglegend.co.je/plugins/X1eJD/VP7oS http://www.jerseyslivinglegend.co.je/plugins/djaOI/6WwNv http://www.reconstyle.nl/libraries/lno/vpOf http://smokymountainportraits.com/plugins/23v/ http://smokymountainportraits.com/plugins/huJ/PfhZ http://www.tfxconnect.com/stats/4MSn/RpH3 http://www.cse-mari.ru/backup/9tl/7ac http://www.estetska.com/pdf/LYw7/1ozD3 http://www.tfxconnect.com/stats/4MSn/IszO0 http://www.estetska.com/pdf/DwQ/PEjxS http://www.jerseyslivinglegend.co.je/plugins/2A0tD/ http://www.tfxconnect.com/stats/4MSn/ http://www.jerseyslivinglegend.co.je/plugins/PdO3/FbCpL http://smokymountainportraits.com/plugins/23v/Jv1 http://smokymountainportraits.com/plugins/9hPV/yX8 http://smokymountainportraits.com/plugins/PZ42j http://www.brothertrouble.com/components/W4da0/4GTy7 http://www.planetzog.co.za/components/oQP7v/Index.phpp46r http://www.planetzog.co.za/components/BOEo/Index.phpjvzLv http://www.cse-mari.ru/backup/2yNJ/eSb3 http://www.brothertrouble.com/components/msBV/GrGV http://www.tfxconnect.com/stats/ZEWLR/wuCyb http://www.brothertrouble.com/components/jAElw http://www.planetzog.co.za/components/8Eh20/Index.phpLc6Wf http://www.3alarmseries.com/documents/QbrJ/Ho0j3 http://www.brothertrouble.com/components/OZ0/nUI1 http://www.jerseyslivinglegend.co.je/plugins/djaOI/p7ve http://www.3alarmseries.com/documents/KGYy0/ http://luxusshop.hu/libraries/sngP/REE9 http://www.3alarmseries.com/documents/F52G http://smokymountainportraits.com/plugins/tLH/lgA1n http://www.brothertrouble.com/components/W4da0/Vae66 http://luxusshop.hu/libraries/VdO/yp6 http://smokymountainportraits.com/plugins/ZmylZ/oNokj http://www.planetzog.co.za/components/oQP7v/Index.phpp46r http://www.tfxconnect.com/stats/yN5Pz/miK http://www.planetzog.co.za/components/oQP7v/Index.phpVmWGm http://www.3alarmseries.com/documents/JIGB/tnr http://www.reconstyle.nl/libraries/E5wu/6yr http://www.cse-mari.ru/backup/Z8oeE/ http://smokymountainportraits.com/plugins/23v/Jv1
<a href="http://smokymountainportraits.com/plugins/9hPV/aHl">http://smokymountainportraits.com/plugins/9hPV/aHl</a> <a href="http://www.tfxconnect.com/stats/uTK">http://www.tfxconnect.com/stats/uTK</a> <a href="http://luxusshop.hu/libraries/4Xb/hN6u9">http://luxusshop.hu/libraries/4Xb/hN6u9</a> <a href="http://terastud.ro/plugins/mD8c/NucEn">http://terastud.ro/plugins/mD8c/NucEn</a> <a href="http://smokymountainportraits.com/plugins/PZ42j/Xjob">http://smokymountainportraits.com/plugins/PZ42j/Xjob</a> http://terastud.ro/plugins/J2zv3/k5ou
hxdrbunctsyw
 
Posts: 96
Joined: Sat Sep 20, 2014 2:47 am

Previous

Return to Miscellaneous

Who is online

Users browsing this forum: No registered users and 2 guests

cron