Open walpino opened 8 years ago
Please show the exact function definition (CREATE FUNCTION
...).
just a simple example
CREATE OR REPLACE FUNCTION query (x int) RETURNS text LANGUAGE plsh AS $$
/usr/bin/curl www.zkb.ch > /tmp/a.html /usr/bin/wget www.zkb.ch > /tmp/a.html $$;
the curl throws an error the wget works
if I'm doing this on the prompt the curl works fine too
And what is your output?
You probably have to run curl
with -s
and wget
with -q
or similar, because plsh will interpret any output to stderr as failure. Other than that, your example works for me.
i want to execute curl from plsh
the procedure looks like
!/....
curl "$1"
and $1 looks like
'https://.....ewad.json' -v -X POST --data-urlencode 'address=fdfdf 38' --insecure --data-urlencode 'size=65' --data-urlencode 'hash=47b51e9dd1c6a833a7f3effe2ee9dc997632' --data-urlencode 'action=insert_ad' --data-urlencode 'region=14' --data-urlencode 'zipcode=3012' --data-urlencode 'app_id=homegate' --data-urlencode 'phone=07382' --data-urlencode 'email=unlead@hotmail.com' --data-urlencode 'body=Beautiful unfu' --data-urlencode 'phone_hidden=0' --data-urlencode 'price=1455' --data-urlencode 'category=1020' --data-urlencode 'rooms=4' --data-urlencode 'area=92' --data-urlencode 'company_ad=1' --data-urlencode 'lang=de' --data-urlencode 'name= ' --data-urlencode 'subject=2.5 room Apartment for rent' --data-urlencode 'no_licenseplate=1' --data-urlencode 'type=u' --data-urlencode 'store_id=49' --data-urlencode 'import=1' --data-urlencode 'external_ad_id=103466419'
the return value is curl(3) illegal character hmm but
if I execute this on the prompt everything works fine
do you have a hint whats wrong with this?
thanks