Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cannot parse json respone when query from foreign table in www_fdw postgresql #33

Open
frbsfri opened this issue Feb 17, 2017 · 0 comments

Comments

@frbsfri
Copy link

frbsfri commented Feb 17, 2017

I am using www_fdw to query from twitter search API, here is the process that I followed:

CREATE extension www_fdw;
CREATE server www_fdw_server_twitter FOREIGN DATA Wrapper www_fdw OPTIONS
     (uri 'https://api.twitter.com/1.1/search/tweets.json',cainfo 'C:/SSLCerts/ca
    bundle.crt'); 
       CREATE USER MAPPING FOR current_user SERVER www_fdw_server_twitter;
        CREATE FOREIGN TABLE www_fdw_twitter (
        /* parameters used in request */
        q text,
        page text,
        rpp text,
        result_type text,
        /* fields in response */
        created_at text,
        from_user text,
        from_user_id text,
        from_user_id_str text,
        geo text,
        id text,
        id_str text,
        is_language_code text,
        profile_image_url text,
        source text,
        text text,
        to_user text,
        to_user_id text
        ) SERVER www_fdw_server_twitter;

When I want to query from my foreign table with following query:

select id,substr(text,1,30)||'...' from www_fdw_twitter where q='postgres';
I get this error:

ERROR: Can't find result in parsed server's json response

I am using postgreSQL 9.5 in window64.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant