[mythtv] More ideas on PostgreSQL support, comments welcome

Jay R. Ashworth jra at baylink.com
Wed Sep 1 15:15:27 EDT 2004


I will read everything before replying to anything...
I will read everything before replying to anything...
I will read everything before replying to anything...
I will read everything before replying to anything...
I will read everything before replying to anything...

On Wed, Sep 01, 2004 at 11:55:39AM -0700, Mike Benoit wrote:
> I'm not sure how familiar you are with PostgreSQL, but for starters,
> PGSQL can't change column types like MySQL can (mostly for good reason
> too, because PGSQL values the data in those columns, where MySQL could
> care less), so to work around this usually requires you rename the
> current table, create a new table with the columns you want, then move
> the data across with a SELECT INTO ... query, then delete the old table
> of course. Luckily this can all be done in a single transaction. 

Actually, I believe recent releases *do* permit altering columns where
they did not previously.

> Modifying columns has similar problems, if your changing default values
> for instance, the helper function is going to have to be smart enough to
> know exactly which cases PGSQL actually allows you to do that in, and
> handle them accordingly. 

Yup.

Cheers,
-- j
-- 
Jay R. Ashworth                                                jra at baylink.com
Designer                          Baylink                             RFC 2100
Ashworth & Associates        The Things I Think                        '87 e24
St Petersburg FL USA      http://baylink.pitas.com             +1 727 647 1274

	"You know: I'm a fan of photosynthesis as much as the next guy,
	but if God merely wanted us to smell the flowers, he wouldn't 
	have invented a 3GHz microprocessor and a 3D graphics board."
					-- Luke Girardi


More information about the mythtv-dev mailing list