On Jan 9, 2008 12:19 PM, leonardz <leonardz@xxxxxxxxxxxx> wrote: > I am reading through HeadFirst SQL (an OReilly book) which uses > specific MySQLisms in its examples. I use postgres on our databases. > Some examples are easy to work around, some are not . > > Is there a rosetta stone (table of commands in one and equivalents > inthe other) available? I've found that a familiarity with the pgsql docs is a necessity when using examples from other dbs. Knowing where ot look is half the battle. > In particular, MySQl seems to have richer string functions to parse > out sub strings and als trim a string for automatic table insertion > from long multifield strings. Have you read the postgresql manual on string functions? Seriously, it's easily a match for MySQL in that arena, and beats it hands down in a few. http://www.postgresql.org/docs/8.2/static/functions-string.html Trimming a string automatically to fit (I think that's what you're alluding to there) is broken behaviour. I.e. if I have a varchar(10) and insert the string 'abcdefghijklmnopqrstuvwxyz' I SHOULD get an error. That string's too big. I don't want my database chopping up my data as it sees fit by default. Especially since in pgsql it's quite easy to setup a trigger to "do the right thing" whatever I might deem that to be. I'd suggest loading up the latest mysql stable release as well as postgresql and playing around with the examples in mysql first to make sure you've got them down, then translating them to postgresql. It's a good training exercise, and will improve your skills in two dbms instead of just one. I also think (much as Erik stated) that you'd be better off with a pgsql, or at least ansi standard SQL oriented book. ---------------------------(end of broadcast)--------------------------- TIP 9: In versions below 8.0, the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match