# Development Server
psql database_name
CREATE TABLE temp_table_name AS SELECT * FROM actual_table WHERE some_field = 'some_value' ORDER BY some_field;
\q
pg_dump -t temp_table_name database_name | gzip > temp_table_name.sql.gz
scp temp_table_name.sql.gz user@server:
psql database_name
DROP TABLE temp_table_name;
# Production Server
zcat temp_table_name.sql.gz | psql database_name
psql database_name
INSERT INTO actual_table SELECT * FROM temp_table_name;
DROP TABLE temp_table_name;
<!-- AppExchange Link http://sites.force.com/appexchange/listingDetail?listingId=a0N30000001g3u0EAA -->
<!-- Jonathan Hersh - jhersh@salesforce.com - 7/13/2009 -->
<apex:component selfclosing="true">
<apex:attribute name="function" description="This is the name of the JS function to call."
type="String" required="true"/>
<apex:attribute name="title" description="This is the title displayed in the lightbox."
type="String" required="true"/>
<apex:attribute name="content" description="This is the HTML content of the lightbox."
type="String" required="true"/>
<apex:attribute name="width" description="This is the width, in pixels, of the lightbox."
type="Integer" required="true"/>
<apex:attribute name="duration" description="This is the duration, in ms, to show the box before it autohides (i.e. 2000ms = 2 sec), or 0 for an untimed box."
type="Integer" required="true"/>
<script type="text/javascript">
function {!function}() {
var box = new parent.SimpleDialog("hersh"+Math.random(), true);
parent.box = box;
box.setTitle("{!title}");
box.createDialog();
box.setWidth({!width});
box.setContentInnerHTML("<a href=\"#\" onclick=\"box.hide();\">Close</a><br /><br /><p>{!content}</p>");
box.setupDefaultButtons();
box.show();
if( {!duration} > 0 )
setTimeout("box.hide();",{!duration});
}
</script>
</apex:component>