On Mon, 12 Jul 2004, Klaus Naumann wrote:
Hi,
sorry, the last patch is buggy which didn't show up in the tests :(
Two LEFTs were missing - new patch is attached.
Greetings, Klaus
>
> Hi,
>
> the attached patch shows the new column "tablespace" in the mentioned
> views.
> Apply with
>
> ~/pgsql$ patch -p1 < 03_showtblspc.diff
>
> Greetings, Klaus
>
>
--
Full Name : Klaus Naumann | (http://www.mgnet.de/) (Germany)
Phone / FAX : ++49/177/7862964 | E-Mail: ([EMAIL PROTECTED])
diff -Ncr pgsql-pitr.orig/src/backend/catalog/system_views.sql
pgsql-pitr/src/backend/catalog/system_views.sql
*** pgsql-pitr.orig/src/backend/catalog/system_views.sql Mon Jul 12 14:20:02
2004
--- pgsql-pitr/src/backend/catalog/system_views.sql Mon Jul 12 14:59:44 2004
***************
*** 41,62 ****
--- 41,66 ----
SELECT
N.nspname AS schemaname,
C.relname AS tablename,
+ T.spcname AS tablespace,
pg_get_userbyid(C.relowner) AS tableowner,
C.relhasindex AS hasindexes,
C.relhasrules AS hasrules,
(C.reltriggers > 0) AS hastriggers
FROM pg_class C LEFT JOIN pg_namespace N ON (N.oid = C.relnamespace)
+ LEFT JOIN pg_tablespace T ON (T.oid = C.reltablespace)
WHERE C.relkind = 'r';
CREATE VIEW pg_indexes AS
SELECT
N.nspname AS schemaname,
C.relname AS tablename,
+ T.spcname AS tablespace,
I.relname AS indexname,
pg_get_indexdef(I.oid) AS indexdef
FROM pg_index X JOIN pg_class C ON (C.oid = X.indrelid)
JOIN pg_class I ON (I.oid = X.indexrelid)
LEFT JOIN pg_namespace N ON (N.oid = C.relnamespace)
+ LEFT JOIN pg_tablespace T ON (T.oid = C.reltablespace)
WHERE C.relkind = 'r' AND I.relkind = 'i';
CREATE VIEW pg_stats AS
---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to [EMAIL PROTECTED] so that your
message can get through to the mailing list cleanly