Re: Does this table exist? - Mailing list pgsql-general

From Ashley Clark
Subject Re: Does this table exist?
Date
Msg-id 20001102150145.C3337@ghoti.org
Whole thread Raw
In response to Does this table exist?  (Alvaro Herrera <alvherre@protecne.cl>)
List 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

Attachment

pgsql-general by date:

Previous
From: Alvaro Herrera
Date:
Subject: Does this table exist?
Next
From: Stephan Szabo
Date:
Subject: Re: Does this table exist?