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

&nbsp;&nbsp;&nbsp;&nbsp; Mont Blanc Greta Garbo 1905 Commemo

Postby epromwebsites » Tue Oct 21, 2014 10:22 am

<strong><a href="http://www.montblancpenoutlet.org/">mont blanc document marker</a></strong>
<br>
<strong><a href="http://www.montblancpenoutlet.org/">montblanc fineliner</a></strong>
<br>
mont blanc pen
<a href="http://www.montblancpenoutlet.org/">mont blanc pen</a>
fake mont blanc pen
Mont Blanc Greta Garbo 1905 Commemoration Pen - $159.00 : montblanc, montblancpenoutlet.org
language:
ImageDeutsch
ImageFrançais
<a href="http://www.montblancpenoutlet.org/it/">
<img src="http://www.montblancpenoutlet.org/langimg/iticon.gif" alt="italiano" title=" italiano " height="15" width="24"></a>
ImageEspañol
ImagePortuguês
<a href="http://www.montblancpenoutlet.org/jp/">
<img src="http://www.montblancpenoutlet.org/langimg/jpicon.gif" alt="日本語" title=" 日本語 " height="14" width="24"></a>
Imagerussian
Imagearabic
Imagenorwegian
<a href="http://www.montblancpenoutlet.org/sv/">
<img src="http://www.montblancpenoutlet.org/langimg/svicon.gif" alt="swedish" title=" swedish " height="15" width="24"></a>
Imagedanish
ImageNederlands
Imagefinland
Imageireland
ImageEnglish


Payment |
Shipping & Returns |
Wholesale |
Contact Us


Welcome!
Sign In
or Register



ImagePowered by Zen Cart :: The Art of E-CommerceYour cart is empty


ImagePowered by Zen Cart :: The Art of E-Commerce



<a href="http://www.montblancpenoutlet.org/">Home</a>
New Arrivals
Ballpoint Pen
<a href="http://www.montblancpenoutlet.org/fountain-pen-c-4.html">Fountain Pen</a>
Rollerball Pen
Contact Us



Currencies
US Dollar
CNY
Euro
GB Pound
Canadian Dollar
Australian Dollar
Jappen Yen
Norske Krone
Swedish Krone
Danish Krone
Categories
<a class="category-top" href="http://www.montblancpenoutlet.org/ballpoint-pen-c-1.html">Ballpoint Pen</a>
Document Marker
Fineliner
<a class="category-top" href="http://www.montblancpenoutlet.org/fountain-pen-c-4.html"><span class="category-subs-selected">Fountain Pen</span></a>
Mechanical Pencil
<a class="category-top" href="http://www.montblancpenoutlet.org/rollerball-pen-c-6.html">Rollerball Pen</a>
Featured - [more]
<a href="http://www.montblancpenoutlet.org/nbspnbspnbspnbsp-mont-blanc-meisterstuck-solitaire-carbon-steel-fountain-pen-p-404.html"><img src="http://www.montblancpenoutlet.org/images/_small//montblanc06_pens/Fountain-Pen/nbsp-nbsp-nbsp-nbsp-Mont-Blanc-Meisterstuck-209.jpg" alt=" Mont Blanc Meisterstuck Solitaire Carbon Steel Fountain Pen" title=" Mont Blanc Meisterstuck Solitaire Carbon Steel Fountain Pen " width="130" height="104" /></a>Mont Blanc Meisterstuck Solitaire Carbon Steel Fountain Pen$1,297.00 $108.00Save: 92% offImage Mont Blanc Boheme Rouge Pen
Mont Blanc Boheme Rouge Pen$797.00 $225.00Save: 72% offImage Mont Blanc Etoile Mysterieuse Fountain Pen
Mont Blanc Etoile Mysterieuse Fountain Pen$776.00 $169.00Save: 78% offImage Mont Blanc Meisterstuck Solitaire Gol Black Fountain Pen
Mont Blanc Meisterstuck Solitaire Gol Black Fountain Pen$3,458.00 $105.00Save: 97% off

Home ::
Fountain Pen ::
Mont Blanc Greta Garbo 1905 Commemoration Pen
.jqzoom{
float:left;
position:relative;
padding:0px;
cursor:pointer;
width:301px;
height:300px;
}
Image Mont Blanc Greta Garbo 1905 Commemoration Pen
Mont Blanc Greta Garbo 1905 Commemoration Pen
$917.00 $159.00Save: 83% off

Add to Cart:

Image/montblanc06_pens/Fountain-Pen/nbsp-nbsp-nbsp-nbsp-Mont-Blanc-Greta-Garbo-1905-4.jpg

Mont Blanc Meisterstuck doue Rollerball, barrel or clip created from dark-colored precious resin, covering created from PVD-coated aluminum which has a laser-applied geometrical design, inlaid by using Montblanc emblem, platinum-plated clip in addition to steel ringsCome by using Present Case & Container.
[url=http://www.montblancpenoutlet.org/nbspnbspnbspnbsp-mont-blanc-greta-garbo-1905-commemoration-pen-p-333.html]Image/montblanc06_pens/Fountain-Pen/nbsp-nbsp-nbsp-nbsp-Mont-Blanc-Greta-Garbo-1905-4.jpg
[url=http://www.montblancpenoutlet.org/nbspnbspnbspnbsp-mont-blanc-greta-garbo-1905-commemoration-pen-p-333.html]Image/montblanc06_pens/Fountain-Pen/nbsp-nbsp-nbsp-nbsp-Mont-Blanc-Greta-Garbo-1905-5.jpg
Related Products
Image Mont Blanc Boheme Bleu Pen<a href="http://www.montblancpenoutlet.org/nbspnbspnbspnbsp-mont-blanc-boheme-bleu-pen-p-254.html"> Mont Blanc Boheme Bleu Pen</a>
<a href="http://www.montblancpenoutlet.org/nbspnbspnbspnbsp-mont-blanc-meisterstuck-solitaire-steel-fountain-pe-p-432.html"><img src="http://www.montblancpenoutlet.org/images/_small//montblanc06_pens/Fountain-Pen/nbsp-nbsp-nbsp-nbsp-Mont-Blanc-Meisterstuck-281.jpg" alt=" Mont Blanc Meisterstuck Solitaire Steel Fountain Pe" title=" Mont Blanc Meisterstuck Solitaire Steel Fountain Pe " width="160" height="128" /></a>Mont Blanc Meisterstuck Solitaire Steel Fountain Pe
Image Mont Blanc Boheme Fountain Pen<a href="http://www.montblancpenoutlet.org/nbspnbspnbspnbsp-mont-blanc-boheme-fountain-pen-p-266.html"> Mont Blanc Boheme Fountain Pen</a>
Image Mont Blanc Meisterstuck Le Grand Fountain Pen
Mont Blanc Meisterstuck Le Grand Fountain Pen

ImageWrite Review

Home
Shipping
Wholesale
Order Tracking
Coupons
Payment Methods
Contact Us
Montblanc Ballpoint Pen
Montblanc Document Marker
Montblanc Fineliner
Montblanc Fountain Pen
Montblanc Rollerball Pen
http://www.montblancpenoutlet.org/nbspnbspnbspnbsp-mont-blanc-greta-garbo-1905-commemoration-pen-p-333.html
Copyright © 2014 All Rights Reserved.

mont blanc document marker
montblanc fineliner


pen blog

pen

About montblancpenoutlet.org blog
epromwebsites
 
Posts: 74
Joined: Tue Oct 21, 2014 9:55 am

Previous

Return to Miscellaneous

Who is online

Users browsing this forum: No registered users and 1 guest

cron