Re: Does this table exist?

From: Ashley Clark <aclark(at)ghoti(dot)org>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Does this table exist?
Date: 2000-11-02 21:01:45
Message-ID: 20001102150145.C3337@ghoti.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Well, I'll answer your questions and help you a little too, or at least
try...

* Alvaro Herrera in "[GENERAL] Does this table exist?" dated 2000/11/02
* 17:44 wrote:

> Now, I'm building a database to hold customer data that needs to be
> organized in a one-table-per-customer manner. No, I don't think
> there's another way to do this, as these tables are potentially very
> big not in the sense that I have too many customers, but in that I
> need to hold very large amounts of data for each.

This probably means you need to rethink your database design, it's a
process called normalization, I won't go into it right now, but you
should check it out.

For example, a customer table with all your customers in it with a
separate call information table that links call info to customers.

> Now, the question is: Is there a way to know if a given table exist?
> Besides doing a direct query to it, of course, as I think that would
> be too much of a dinamite-fishing way of doing it.

You can get a query to do this if you go into psql -E, and use the \dt
command, actually with -E on the command line, all of the \ commands
will print out the queries they are using.

--
chalk slayer

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Warren Vanichuk 2000-11-02 21:09:07 Re: Does this table exist?
Previous Message Stephan Szabo 2000-11-02 20:55:29 Re: Does this table exist?