Re: Novice Question - Mailing list pgsql-general

From Edmund Bacon
Subject Re: Novice Question
Date
Msg-id m3ll97jb4g.fsf@elb_lx.onesystem.ca
Whole thread Raw
In response to Novice Question  (Michael Romagnoli <michael@houseind.com>)
List pgsql-general
michael@houseind.com (Michael Romagnoli) writes:

> What kind of command would I run if I wanted to copy an entire table
> (along with renaming it, and, of course, all data from the first table
> -
> some of which is binary)?

SELECT * INTO newtable FROM oldtable;

Note that this doesn't construct indexes, Foreign keys, constraints,
etc.

If by 'binary data' you mean BLOBs, I'd expect the above to work.
Other than that, AFAIUI you have no reasonable expectation that your data is
stored in any meaningful binary format by the database.  All data
could be internally stored as strings (though that might be very
slow).



--
Remove -42 for email

pgsql-general by date:

Previous
From: Steffen Boehme
Date:
Subject: Performance of Views
Next
From: Ragnar Hafstað
Date:
Subject: Re: sql join question