Okay, so far I'm *really* liking Pg.  I have successfully imported all of my
tables and data, and have everything fixed with one exception: updating the
currval() of the sequence for the 'auto_number' fields.  I can go through
each sequence one at a time with the GUI and update it, but I'd obviously
prefer to do so via script.  Here's what I've tried, but it throws a syntax
error:

ALTER SEQUENCE seq_name RESTART WITH (SELECT max(id) + 1 FROM table_name);

Apparently it does not like the query to be used as the value.  I'm still
reading through the docs to see if I can find where/how to do what I'm
trying to do, but figured I'd cheat and post back to you guys as well.


Thanks,

Matt


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Create robust enterprise, web RIAs.
Upgrade & integrate Adobe Coldfusion MX7 with Flex 2
http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:266422
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to