Results 1 to 4 of 4
  1. #1
    Join Date
    May 2009
    Posts
    6

    Unanswered: ID (temp) tables

    I'm trying to figure out how to detect (temp) tables in pl/pgsql (8.2).

    In SQL Server, I would do something like:

    SELECT tabid
    INTO _tabid
    FROM systables
    WHERE tabname = 'tabname';

    However, in 2 days, I havn't found it.

    Thanks,
    Jay
    Last edited by JayKon; 05-30-09 at 20:02.

  2. #2
    Join Date
    Jun 2004
    Location
    Arizona, USA
    Posts
    1,848
    Have you looked at the information schema?
    Lou
    使大吃一惊
    "Lisa, in this house, we obey the laws of thermodynamics!" - Homer Simpson
    "I have my standards. They may be low, but I have them!" - Bette Middler
    "It's a book about a Spanish guy named Manual. You should read it." - Dilbert


  3. #3
    Join Date
    May 2009
    Posts
    6
    Quote Originally Posted by loquin
    Have you looked at the information schema?
    That was enough to open the gate. Thanks.

    It seems the Postgress system catalogs are a little wierd to me. Now that I'm in, it makes more sense.

  4. #4
    Join Date
    Jun 2004
    Location
    Arizona, USA
    Posts
    1,848
    Information schema are ANSI standard metadata views. Postgresql, MySQL, and SQL Server (v2005) support them.

    Occasionally you'll still need to get into PostgreSQL's underlying system tables to get a particular piece of information. But, their layout is specific to PostgreSQL, just as SQL Server's system table layout is specific to SQL Server, and MySQL's are specific to MySQL. That's the reason for the ANSI information_schema views - to provide some level of metadata standardization.
    Last edited by loquin; 06-01-09 at 17:36.
    Lou
    使大吃一惊
    "Lisa, in this house, we obey the laws of thermodynamics!" - Homer Simpson
    "I have my standards. They may be low, but I have them!" - Bette Middler
    "It's a book about a Spanish guy named Manual. You should read it." - Dilbert


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •