Skip site navigation (1) Skip section navigation (2)

LEFT JOIN used in psql describe.c

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: PostgreSQL-development <pgsql-hackers(at)postgreSQL(dot)org>
Subject: LEFT JOIN used in psql describe.c
Date: 2005-04-02 03:15:51
Message-ID: 200504020315.j323Fp909810@candle.pha.pa.us (view raw or flat)
Thread:
Lists: pgsql-hackers
Does anyone know why so many LEFT JOINs are used in psql/describe.c to
join to the pg_namespace table, like here:

   printfPQExpBuffer(&buf,
      "SELECT c.oid,\n"
      "  n.nspname,\n"
      "  c.relname\n"
      "FROM pg_catalog.pg_class c\n"
      "     LEFT JOIN pg_catalog.pg_namespace n ON n.oid = c.relnamespace\n");

    processNamePattern(&buf, pattern, false, false,
       "n.nspname", "c.relname", NULL,
       "pg_catalog.pg_table_is_visible(c.oid)");

I thought a pg_class row always pointed to a valid pg_namespace row because
of our dependency restrictions.

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman(at)candle(dot)pha(dot)pa(dot)us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

Responses

pgsql-hackers by date

Next:From: Bruce MomjianDate: 2005-04-02 03:16:16
Subject: Re: [HACKERS] plPHP in core?
Previous:From: Paul TillotsonDate: 2005-04-02 03:14:07
Subject: Re: Debugging deadlocks

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group