Quantcast
Channel: Toad Extension for Eclipse
Viewing all articles
Browse latest Browse all 978

Forum Post: RE: bug with postgresql

$
0
0
Hi Szabolcs, I haven't been able to reproduce, though there may be some code inefficiency allowing wrong output you are experiencing. Could you possibly try to run the following SELECT to see what output you get from your db? Just replace 'postgres' schema with your one in WHERE clause. SELECT b.attname AS column_name, b.relname AS table_name, c.conname   FROM (SELECT a.attname,                t.relname,                a.attnum,                t.oid           FROM pg_attribute a,                pg_class t,                pg_namespace s,                pg_type x          WHERE     t.relnamespace = s.oid                AND s.nspname = 'postgres'                AND (t.relkind = 'r' OR t.relkind = 'v')                AND a.attrelid = t.oid                AND a.atttypid = x.oid                AND a.attnum 0) b        LEFT JOIN pg_constraint c           ON     c.conrelid = b.oid              AND b.attnum = ANY (c.conkey)              AND c.contype = 'p'  WHERE b.relname = 'sample_view' In my case, I get the following output. Thank you! Lukas

Viewing all articles
Browse latest Browse all 978

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>