{"action":"opened","issue":{"url":"https://api.github.com/repos/SpriteLink/NIPAP/issues/724","labels_url":"https://api.github.com/repos/SpriteLink/NIPAP/issues/724/labels{/name}","comments_url":"https://api.github.com/repos/SpriteLink/NIPAP/issues/724/comments","events_url":"https://api.github.com/repos/SpriteLink/NIPAP/issues/724/events","html_url":"https://github.com/SpriteLink/NIPAP/issues/724","id":66141957,"number":724,"title":"Unable to execute query: permission denied for relation ","user":{"login":"florinciprian","id":11785552,"avatar_url":"https://avatars.githubusercontent.com/u/11785552?v=3","gravatar_id":"","url":"https://api.github.com/users/florinciprian","html_url":"https://github.com/florinciprian","followers_url":"https://api.github.com/users/florinciprian/followers","following_url":"https://api.github.com/users/florinciprian/following{/other_user}","gists_url":"https://api.github.com/users/florinciprian/gists{/gist_id}","starred_url":"https://api.github.com/users/florinciprian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/florinciprian/subscriptions","organizations_url":"https://api.github.com/users/florinciprian/orgs","repos_url":"https://api.github.com/users/florinciprian/repos","events_url":"https://api.github.com/users/florinciprian/events{/privacy}","received_events_url":"https://api.github.com/users/florinciprian/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-04-03T12:55:36Z","updated_at":"2015-04-03T12:55:36Z","closed_at":null,"body":"Hello,\r\n\r\nI have installed NIPAP and I can't add prefixes, pools, vrf from web UI. I receive : \r\n\r\nUnable to execute query: permission denied for relation ip_net_plan\r\nUnable to execute query: permission denied for relation ip_net_plan\r\nUnable to execute query: permission denied for relation ip_net_vrf\r\n\r\ntail -f /var/log/postgresql/postgresql-9.4-main.log\r\n\t            )\r\n\t            JOIN ip_net_vrf AS vrf ON (p1.vrf_id = vrf.id)\r\n\t            LEFT JOIN ip_net_pool AS pool ON (p1.pool_id = pool.id)\r\n\t            -- possible set where conditions, if we are doing a parent_prefix operation\r\n\r\n\t            ORDER BY vrf_rt_order(vrf.rt) NULLS FIRST, p1.prefix, CASE WHEN p1.prefix = p2.prefix THEN 0 ELSE 1 END OFFSET 0) AS a ORDER BY vrf_rt_order(vrf_rt) NULLS FIRST, prefix\r\n2015-04-03 15:50:39 EEST [9212-3] nipap@nipap ERROR:  permission denied for relation ip_net_vrf\r\n2015-04-03 15:50:39 EEST [9212-4] nipap@nipap STATEMENT:  SELECT * FROM ip_net_vrf ORDER BY vrf_rt_order(rt) NULLS FIRST\r\n2015-04-03 15:50:39 EEST [9213-1] nipap@nipap ERROR:  permission denied for relation ip_net_vrf\r\n2015-04-03 15:50:39 EEST [9213-2] nipap@nipap STATEMENT:  SELECT * FROM ip_net_vrf ORDER BY vrf_rt_order(rt) NULLS FIRST\r\n2015-04-03 15:53:36 EEST [9213-3] nipap@nipap ERROR:  permission denied for relation ip_net_plan\r\n2015-04-03 15:53:36 EEST [9213-4] nipap@nipap STATEMENT:\r\n\t    SELECT\r\n\t        id,\r\n\t        vrf_id,\r\n\t        vrf_rt,\r\n\t        vrf_name,\r\n\t        family,\r\n\t        display,\r\n\t        match,\r\n\t        prefix,\r\n\t        prefix_length,\r\n\t        display_prefix::text AS display_prefix,\r\n\t        description,\r\n\t        comment,\r\n\t        inherited_tags,\r\n\t        tags,\r\n\t        node,\r\n\t        pool_id,\r\n\t        pool_name,\r\n\t        type,\r\n\t        status,\r\n\t        indent,\r\n\t        country,\r\n\t        order_id,\r\n\t        customer_id,\r\n\t        external_key,\r\n\t        authoritative_source,\r\n\t        alarm_priority,\r\n\t        monitor,\r\n\t        vlan,\r\n\t        added,\r\n\t        last_modified,\r\n\t        children,\r\n\t        total_addresses,\r\n\t        used_addresses,\r\n\t        free_addresses,\r\n\t        avps,\r\n\t        expires\r\n\t    FROM (\r\n\t        SELECT DISTINCT ON(vrf_rt_order(vrf.rt), p1.prefix) p1.id,\r\n\t            p1.prefix,\r\n\t            p1.display_prefix,\r\n\t            p1.description,\r\n\t            p1.comment,\r\n\t            COALESCE(p1.inherited_tags, '{}') AS inherited_tags,\r\n\t            COALESCE(p1.tags, '{}') AS tags,\r\n\t            p1.node,\r\n\t            pool.id AS pool_id,\r\n\t            pool.name AS pool_name,\r\n\t            p1.type,\r\n\t            p1.indent,\r\n\t            p1.country,\r\n\t            p1.order_id,\r\n\t            p1.customer_id,\r\n\t            p1.external_key,\r\n\t            p1.authoritative_source,\r\n\t            p1.alarm_priority,\r\n\t            p1.monitor,\r\n\t            p1.vlan,\r\n\t            p1.added,\r\n\t            p1.last_modified,\r\n\t            p1.children,\r\n\t            p1.total_addresses,\r\n\t            p1.used_addresses,\r\n\t            p1.free_addresses,\r\n\t            p1.status,\r\n\t            p1.avps,\r\n\t            p1.expires,\r\n\t            vrf.id AS vrf_id,\r\n\t            vrf.rt AS vrf_rt,\r\n\t            vrf.name AS vrf_name,\r\n\t            masklen(p1.prefix) AS prefix_length,\r\n\t            family(p1.prefix) AS family,\r\n\t            ((p1.prefix << p2.display_prefix OR p2.prefix <<= p1.prefix ) OR (p2.prefix >>= p1.prefix AND p1.indent BETWEEN p2.indent AND p2.indent + 0)) AS display,\r\n\t            CASE WHEN p1.prefix = p2.prefix THEN true ELSE false END AS match\r\n\t            FROM ip_net_plan AS p1\r\n\t            -- possible set LEFT OUTER JOIN, if we are doing a parent_prefix operation\r\n\t             JOIN ip_net_plan AS p2 ON\r\n\t            (\r\n\t                (\r\n\t                    (p1.vrf_id = p2.vrf_id)\r\n\t                    AND\r\n\t                    (\r\n\t                        -- Join in the parents (p1) of matching prefixes (p2)\r\n\t                        (iprange(p1.prefix) >>= iprange(p2.prefix) )\r\n\t                        OR\r\n\t                        -- Join in the children (p1) of matching prefixes (p2)\r\n\t                        (iprange(p1.prefix) << iprange(p2.prefix) AND p1.indent BETWEEN p2.indent AND p2.indent + 0)\r\n\t                        OR\r\n\t                        -- Join in all neighbors (p1) of matching prefixes (p2)\r\n\t                        (true = true AND iprange(p1.prefix) << iprange(p2.display_prefix::cidr) AND p1.indent = p2.indent)\r\n\t                    )\r\n\t                )\r\n\t                -- set match conditions for p2\r\n\t                AND p2.id IN (\r\n\t                    SELECT inp.id FROM ip_net_plan AS inp JOIN ip_net_vrf AS vrf ON inp.vrf_id = vrf.id LEFT JOIN ip_net_pool AS pool ON inp.pool_id = pool.id\r\n\t                        WHERE  ( ( ( ( ( COALESCE(inp.comment, '') ~* ''  OR  COALESCE(inp.description, '') ~* '' )  OR  COALESCE(inp.node, '') ~* '' )  OR  COALESCE(inp.order_id, '') ~* '' )  OR  COALESCE(inp.customer_id, '') ~* '' )  AND  inp.indent = '0' )\r\n\t                    ORDER BY vrf_rt_order(vrf.rt) NULLS FIRST, prefix\r\n\t                    LIMIT 50\r\n\t                )\r\n\t            )\r\n\t            JOIN ip_net_vrf AS vrf ON (p1.vrf_id = vrf.id)\r\n\t            LEFT JOIN ip_net_pool AS pool ON (p1.pool_id = pool.id)\r\n\t            -- possible set where conditions, if we are doing a parent_prefix operation\r\n\r\n\t            ORDER BY vrf_rt_order(vrf.rt) NULLS FIRST, p1.prefix, CASE WHEN p1.prefix = p2.prefix THEN 0 ELSE 1 END OFFSET 0) AS a ORDER BY vrf_rt_order(vrf_rt) NULLS FIRST, prefix\r\n2015-04-03 15:53:36 EEST [9267-1] nipap@nipap ERROR:  permission denied for relation ip_net_plan\r\n2015-04-03 15:53:36 EEST [9267-2] nipap@nipap STATEMENT:\r\n\t    SELECT\r\n\t        id,\r\n\t        vrf_id,\r\n\t        vrf_rt,\r\n\t        vrf_name,\r\n\t        family,\r\n\t        display,\r\n\t        match,\r\n\t        prefix,\r\n\t        prefix_length,\r\n\t        display_prefix::text AS display_prefix,\r\n\t        description,\r\n\t        comment,\r\n\t        inherited_tags,\r\n\t        tags,\r\n\t        node,\r\n\t        pool_id,\r\n\t        pool_name,\r\n\t        type,\r\n\t        status,\r\n\t        indent,\r\n\t        country,\r\n\t        order_id,\r\n\t        customer_id,\r\n\t        external_key,\r\n\t        authoritative_source,\r\n\t        alarm_priority,\r\n\t        monitor,\r\n\t        vlan,\r\n\t        added,\r\n\t        last_modified,\r\n\t        children,\r\n\t        total_addresses,\r\n\t        used_addresses,\r\n\t        free_addresses,\r\n\t        avps,\r\n\t        expires\r\n\t    FROM (\r\n\t        SELECT DISTINCT ON(vrf_rt_order(vrf.rt), p1.prefix) p1.id,\r\n\t            p1.prefix,\r\n\t            p1.display_prefix,\r\n\t            p1.description,\r\n\t            p1.comment,\r\n\t            COALESCE(p1.inherited_tags, '{}') AS inherited_tags,\r\n\t            COALESCE(p1.tags, '{}') AS tags,\r\n\t            p1.node,\r\n\t            pool.id AS pool_id,\r\n\t            pool.name AS pool_name,\r\n\t            p1.type,\r\n\t            p1.indent,\r\n\t            p1.country,\r\n\t            p1.order_id,\r\n\t            p1.customer_id,\r\n\t            p1.external_key,\r\n\t            p1.authoritative_source,\r\n\t            p1.alarm_priority,\r\n\t            p1.monitor,\r\n\t            p1.vlan,\r\n\t            p1.added,\r\n\t            p1.last_modified,\r\n\t            p1.children,\r\n\t            p1.total_addresses,\r\n\t            p1.used_addresses,\r\n\t            p1.free_addresses,\r\n\t            p1.status,\r\n\t            p1.avps,\r\n\t            p1.expires,\r\n\t            vrf.id AS vrf_id,\r\n\t            vrf.rt AS vrf_rt,\r\n\t            vrf.name AS vrf_name,\r\n\t            masklen(p1.prefix) AS prefix_length,\r\n\t            family(p1.prefix) AS family,\r\n\t            ((p1.prefix << p2.display_prefix OR p2.prefix <<= p1.prefix ) OR (p2.prefix >>= p1.prefix AND p1.indent BETWEEN p2.indent AND p2.indent + 0)) AS display,\r\n\t            CASE WHEN p1.prefix = p2.prefix THEN true ELSE false END AS match\r\n\t            FROM ip_net_plan AS p1\r\n\t            -- possible set LEFT OUTER JOIN, if we are doing a parent_prefix operation\r\n\t             JOIN ip_net_plan AS p2 ON\r\n\t            (\r\n\t                (\r\n\t                    (p1.vrf_id = p2.vrf_id)\r\n\t                    AND\r\n\t                    (\r\n\t                        -- Join in the parents (p1) of matching prefixes (p2)\r\n\t                        (iprange(p1.prefix) >>= iprange(p2.prefix) )\r\n\t                        OR\r\n\t                        -- Join in the children (p1) of matching prefixes (p2)\r\n\t                        (iprange(p1.prefix) << iprange(p2.prefix) AND p1.indent BETWEEN p2.indent AND p2.indent + 0)\r\n\t                        OR\r\n\t                        -- Join in all neighbors (p1) of matching prefixes (p2)\r\n\t                        (true = true AND iprange(p1.prefix) << iprange(p2.display_prefix::cidr) AND p1.indent = p2.indent)\r\n\t                    )\r\n\t                )\r\n\t                -- set match conditions for p2\r\n\t                AND p2.id IN (\r\n\t                    SELECT inp.id FROM ip_net_plan AS inp JOIN ip_net_vrf AS vrf ON inp.vrf_id = vrf.id LEFT JOIN ip_net_pool AS pool ON inp.pool_id = pool.id\r\n\t                        WHERE  ( ( ( ( ( COALESCE(inp.comment, '') ~* ''  OR  COALESCE(inp.description, '') ~* '' )  OR  COALESCE(inp.node, '') ~* '' )  OR  COALESCE(inp.order_id, '') ~* '' )  OR  COALESCE(inp.customer_id, '') ~* '' )  AND  inp.indent = '0' )\r\n\t                    ORDER BY vrf_rt_order(vrf.rt) NULLS FIRST, prefix\r\n\t                    LIMIT 50\r\n\t                )\r\n\t            )\r\n\t            JOIN ip_net_vrf AS vrf ON (p1.vrf_id = vrf.id)\r\n\t            LEFT JOIN ip_net_pool AS pool ON (p1.pool_id = pool.id)\r\n\t            -- possible set where conditions, if we are doing a parent_prefix operation\r\n\r\n\t            ORDER BY vrf_rt_order(vrf.rt) NULLS FIRST, p1.prefix, CASE WHEN p1.prefix = p2.prefix THEN 0 ELSE 1 END OFFSET 0) AS a ORDER BY vrf_rt_order(vrf_rt) NULLS FIRST, prefix\r\n2015-04-03 15:53:36 EEST [9267-3] nipap@nipap ERROR:  permission denied for relation ip_net_plan\r\n2015-04-03 15:53:36 EEST [9267-4] nipap@nipap STATEMENT:\r\n\t    SELECT\r\n\t        id,\r\n\t        vrf_id,\r\n\t        vrf_rt,\r\n\t        vrf_name,\r\n\t        family,\r\n\t        display,\r\n\t        match,\r\n\t        prefix,\r\n\t        prefix_length,\r\n\t        display_prefix::text AS display_prefix,\r\n\t        description,\r\n\t        comment,\r\n\t        inherited_tags,\r\n\t        tags,\r\n\t        node,\r\n\t        pool_id,\r\n\t        pool_name,\r\n\t        type,\r\n\t        status,\r\n\t        indent,\r\n\t        country,\r\n\t        order_id,\r\n\t        customer_id,\r\n\t        external_key,\r\n\t        authoritative_source,\r\n\t        alarm_priority,\r\n\t        monitor,\r\n\t        vlan,\r\n\t        added,\r\n\t        last_modified,\r\n\t        children,\r\n\t        total_addresses,\r\n\t        used_addresses,\r\n\t        free_addresses,\r\n\t        avps,\r\n\t        expires\r\n\t    FROM (\r\n\t        SELECT DISTINCT ON(vrf_rt_order(vrf.rt), p1.prefix) p1.id,\r\n\t            p1.prefix,\r\n\t            p1.display_prefix,\r\n\t            p1.description,\r\n\t            p1.comment,\r\n\t            COALESCE(p1.inherited_tags, '{}') AS inherited_tags,\r\n\t            COALESCE(p1.tags, '{}') AS tags,\r\n\t            p1.node,\r\n\t            pool.id AS pool_id,\r\n\t            pool.name AS pool_name,\r\n\t            p1.type,\r\n\t            p1.indent,\r\n\t            p1.country,\r\n\t            p1.order_id,\r\n\t            p1.customer_id,\r\n\t            p1.external_key,\r\n\t            p1.authoritative_source,\r\n\t            p1.alarm_priority,\r\n\t            p1.monitor,\r\n\t            p1.vlan,\r\n\t            p1.added,\r\n\t            p1.last_modified,\r\n\t            p1.children,\r\n\t            p1.total_addresses,\r\n\t            p1.used_addresses,\r\n\t            p1.free_addresses,\r\n\t            p1.status,\r\n\t            p1.avps,\r\n\t            p1.expires,\r\n\t            vrf.id AS vrf_id,\r\n\t            vrf.rt AS vrf_rt,\r\n\t            vrf.name AS vrf_name,\r\n\t            masklen(p1.prefix) AS prefix_length,\r\n\t            family(p1.prefix) AS family,\r\n\t            ((p1.prefix << p2.display_prefix OR p2.prefix <<= p1.prefix ) OR (p2.prefix >>= p1.prefix AND p1.indent BETWEEN p2.indent AND p2.indent + 0)) AS display,\r\n\t            CASE WHEN p1.prefix = p2.prefix THEN true ELSE false END AS match\r\n\t            FROM ip_net_plan AS p1\r\n\t            -- possible set LEFT OUTER JOIN, if we are doing a parent_prefix operation\r\n\t             JOIN ip_net_plan AS p2 ON\r\n\t            (\r\n\t                (\r\n\t                    (p1.vrf_id = p2.vrf_id)\r\n\t                    AND\r\n\t                    (\r\n\t                        -- Join in the parents (p1) of matching prefixes (p2)\r\n\t                        (iprange(p1.prefix) >>= iprange(p2.prefix) )\r\n\t                        OR\r\n\t                        -- Join in the children (p1) of matching prefixes (p2)\r\n\t                        (iprange(p1.prefix) << iprange(p2.prefix) AND p1.indent BETWEEN p2.indent AND p2.indent + 0)\r\n\t                        OR\r\n\t                        -- Join in all neighbors (p1) of matching prefixes (p2)\r\n\t                        (true = true AND iprange(p1.prefix) << iprange(p2.display_prefix::cidr) AND p1.indent = p2.indent)\r\n\t                    )\r\n\t                )\r\n\t                -- set match conditions for p2\r\n\t                AND p2.id IN (\r\n\t                    SELECT inp.id FROM ip_net_plan AS inp JOIN ip_net_vrf AS vrf ON inp.vrf_id = vrf.id LEFT JOIN ip_net_pool AS pool ON inp.pool_id = pool.id\r\n\t                        WHERE  ( ( ( ( ( COALESCE(inp.comment, '') ~* ''  OR  COALESCE(inp.description, '') ~* '' )  OR  COALESCE(inp.node, '') ~* '' )  OR  COALESCE(inp.order_id, '') ~* '' )  OR  COALESCE(inp.customer_id, '') ~* '' )  AND  inp.indent = '0' )\r\n\t                    ORDER BY vrf_rt_order(vrf.rt) NULLS FIRST, prefix\r\n\t                    LIMIT 50\r\n\t                )\r\n\t            )\r\n\t            JOIN ip_net_vrf AS vrf ON (p1.vrf_id = vrf.id)\r\n\t            LEFT JOIN ip_net_pool AS pool ON (p1.pool_id = pool.id)\r\n\t            -- possible set where conditions, if we are doing a parent_prefix operation\r\n\r\n\t            ORDER BY vrf_rt_order(vrf.rt) NULLS FIRST, p1.prefix, CASE WHEN p1.prefix = p2.prefix THEN 0 ELSE 1 END OFFSET 0) AS a ORDER BY vrf_rt_order(vrf_rt) NULLS FIRST, prefix\r\n2015-04-03 15:53:36 EEST [9268-1] nipap@nipap ERROR:  permission denied for relation ip_net_plan\r\n2015-04-03 15:53:36 EEST [9268-2] nipap@nipap STATEMENT:\r\n\t    SELECT\r\n\t        id,\r\n\t        vrf_id,\r\n\t        vrf_rt,\r\n\t        vrf_name,\r\n\t        family,\r\n\t        display,\r\n\t        match,\r\n\t        prefix,\r\n\t        prefix_length,\r\n\t        display_prefix::text AS display_prefix,\r\n\t        description,\r\n\t        comment,\r\n\t        inherited_tags,\r\n\t        tags,\r\n\t        node,\r\n\t        pool_id,\r\n\t        pool_name,\r\n\t        type,\r\n\t        status,\r\n\t        indent,\r\n\t        country,\r\n\t        order_id,\r\n\t        customer_id,\r\n\t        external_key,\r\n\t        authoritative_source,\r\n\t        alarm_priority,\r\n\t        monitor,\r\n\t        vlan,\r\n\t        added,\r\n\t        last_modified,\r\n\t        children,\r\n\t        total_addresses,\r\n\t        used_addresses,\r\n\t        free_addresses,\r\n\t        avps,\r\n\t        expires\r\n\t    FROM (\r\n\t        SELECT DISTINCT ON(vrf_rt_order(vrf.rt), p1.prefix) p1.id,\r\n\t            p1.prefix,\r\n\t            p1.display_prefix,\r\n\t            p1.description,\r\n\t            p1.comment,\r\n\t            COALESCE(p1.inherited_tags, '{}') AS inherited_tags,\r\n\t            COALESCE(p1.tags, '{}') AS tags,\r\n\t            p1.node,\r\n\t            pool.id AS pool_id,\r\n\t            pool.name AS pool_name,\r\n\t            p1.type,\r\n\t            p1.indent,\r\n\t            p1.country,\r\n\t            p1.order_id,\r\n\t            p1.customer_id,\r\n\t            p1.external_key,\r\n\t            p1.authoritative_source,\r\n\t            p1.alarm_priority,\r\n\t            p1.monitor,\r\n\t            p1.vlan,\r\n\t            p1.added,\r\n\t            p1.last_modified,\r\n\t            p1.children,\r\n\t            p1.total_addresses,\r\n\t            p1.used_addresses,\r\n\t            p1.free_addresses,\r\n\t            p1.status,\r\n\t            p1.avps,\r\n\t            p1.expires,\r\n\t            vrf.id AS vrf_id,\r\n\t            vrf.rt AS vrf_rt,\r\n\t            vrf.name AS vrf_name,\r\n\t            masklen(p1.prefix) AS prefix_length,\r\n\t            family(p1.prefix) AS family,\r\n\t            ((p1.prefix << p2.display_prefix OR p2.prefix <<= p1.prefix ) OR (p2.prefix >>= p1.prefix AND p1.indent BETWEEN p2.indent AND p2.indent + 0)) AS display,\r\n\t            CASE WHEN p1.prefix = p2.prefix THEN true ELSE false END AS match\r\n\t            FROM ip_net_plan AS p1\r\n\t            -- possible set LEFT OUTER JOIN, if we are doing a parent_prefix operation\r\n\t             JOIN ip_net_plan AS p2 ON\r\n\t            (\r\n\t                (\r\n\t                    (p1.vrf_id = p2.vrf_id)\r\n\t                    AND\r\n\t                    (\r\n\t                        -- Join in the parents (p1) of matching prefixes (p2)\r\n\t                        (iprange(p1.prefix) >>= iprange(p2.prefix) )\r\n\t                        OR\r\n\t                        -- Join in the children (p1) of matching prefixes (p2)\r\n\t                        (iprange(p1.prefix) << iprange(p2.prefix) AND p1.indent BETWEEN p2.indent AND p2.indent + 0)\r\n\t                        OR\r\n\t                        -- Join in all neighbors (p1) of matching prefixes (p2)\r\n\t                        (true = true AND iprange(p1.prefix) << iprange(p2.display_prefix::cidr) AND p1.indent = p2.indent)\r\n\t                    )\r\n\t                )\r\n\t                -- set match conditions for p2\r\n\t                AND p2.id IN (\r\n\t                    SELECT inp.id FROM ip_net_plan AS inp JOIN ip_net_vrf AS vrf ON inp.vrf_id = vrf.id LEFT JOIN ip_net_pool AS pool ON inp.pool_id = pool.id\r\n\t                        WHERE  ( ( ( ( ( COALESCE(inp.comment, '') ~* ''  OR  COALESCE(inp.description, '') ~* '' )  OR  COALESCE(inp.node, '') ~* '' )  OR  COALESCE(inp.order_id, '') ~* '' )  OR  COALESCE(inp.customer_id, '') ~* '' )  AND  inp.indent = '0' )\r\n\t                    ORDER BY vrf_rt_order(vrf.rt) NULLS FIRST, prefix\r\n\t                    LIMIT 50\r\n\t                )\r\n\t            )\r\n\t            JOIN ip_net_vrf AS vrf ON (p1.vrf_id = vrf.id)\r\n\t            LEFT JOIN ip_net_pool AS pool ON (p1.pool_id = pool.id)\r\n\t            -- possible set where conditions, if we are doing a parent_prefix operation\r\n\r\n\t            ORDER BY vrf_rt_order(vrf.rt) NULLS FIRST, p1.prefix, CASE WHEN p1.prefix = p2.prefix THEN 0 ELSE 1 END OFFSET 0) AS a ORDER BY vrf_rt_order(vrf_rt) NULLS FIRST, prefix\r\n2015-04-03 15:54:25 EEST [9268-3] nipap@nipap ERROR:  permission denied for relation ip_net_pool\r\n2015-04-03 15:54:25 EEST [9268-4] nipap@nipap STATEMENT:  SELECT DISTINCT (po.id),\r\n\t                        po.id,\r\n\t                        po.name,\r\n\t                        po.description,\r\n\t                        po.default_type,\r\n\t                        po.ipv4_default_prefix_length,\r\n\t                        po.ipv6_default_prefix_length,\r\n\t                        po.member_prefixes_v4,\r\n\t                        po.member_prefixes_v6,\r\n\t                        po.used_prefixes_v4,\r\n\t                        po.used_prefixes_v6,\r\n\t                        po.free_prefixes_v4,\r\n\t                        po.free_prefixes_v6,\r\n\t                        po.total_prefixes_v4,\r\n\t                        po.total_prefixes_v6,\r\n\t                        po.total_addresses_v4,\r\n\t                        po.total_addresses_v6,\r\n\t                        po.used_addresses_v4,\r\n\t                        po.used_addresses_v6,\r\n\t                        po.free_addresses_v4,\r\n\t                        po.free_addresses_v6,\r\n\t                        po.tags,\r\n\t                        po.avps,\r\n\t                        vrf.id AS vrf_id,\r\n\t                        vrf.rt AS vrf_rt,\r\n\t                        vrf.name AS vrf_name,\r\n\t                        (SELECT array_agg(prefix::text) FROM (SELECT prefix FROM ip_net_plan WHERE pool_id=po.id ORDER BY prefix) AS a) AS prefixes\r\n\t                FROM ip_net_pool AS po\r\n\t                LEFT OUTER JOIN ip_net_plan AS inp ON (inp.pool_id = po.id)\r\n\t                LEFT OUTER JOIN ip_net_vrf AS vrf ON (vrf.id = inp.vrf_id) ORDER BY name\r\n2015-04-03 15:54:25 EEST [9271-1] nipap@nipap ERROR:  permission denied for relation ip_net_pool\r\n2015-04-03 15:54:25 EEST [9271-2] nipap@nipap STATEMENT:  SELECT DISTINCT (po.id),\r\n\t                        po.id,\r\n\t                        po.name,\r\n\t                        po.description,\r\n\t                        po.default_type,\r\n\t                        po.ipv4_default_prefix_length,\r\n\t                        po.ipv6_default_prefix_length,\r\n\t                        po.member_prefixes_v4,\r\n\t                        po.member_prefixes_v6,\r\n\t                        po.used_prefixes_v4,\r\n\t                        po.used_prefixes_v6,\r\n\t                        po.free_prefixes_v4,\r\n\t                        po.free_prefixes_v6,\r\n\t                        po.total_prefixes_v4,\r\n\t                        po.total_prefixes_v6,\r\n\t                        po.total_addresses_v4,\r\n\t                        po.total_addresses_v6,\r\n\t                        po.used_addresses_v4,\r\n\t                        po.used_addresses_v6,\r\n\t                        po.free_addresses_v4,\r\n\t                        po.free_addresses_v6,\r\n\t                        po.tags,\r\n\t                        po.avps,\r\n\t                        vrf.id AS vrf_id,\r\n\t                        vrf.rt AS vrf_rt,\r\n\t                        vrf.name AS vrf_name,\r\n\t                        (SELECT array_agg(prefix::text) FROM (SELECT prefix FROM ip_net_plan WHERE pool_id=po.id ORDER BY prefix) AS a) AS prefixes\r\n\t                FROM ip_net_pool AS po\r\n\t                LEFT OUTER JOIN ip_net_plan AS inp ON (inp.pool_id = po.id)\r\n\t                LEFT OUTER JOIN ip_net_vrf AS vrf ON (vrf.id = inp.vrf_id) ORDER BY name\r\n"}}