Postgres Scoop
|
|
By denshi , Section Code [] Posted on Fri Aug 31, 2001 at 12:00:00 PM PST
|
|
I have the beginnings of a Postgres-based Scoop running at http://www.toddbrandlabs.com:8080/scoop
Obviously, it will be jumping up and down like a yo-yo over the next few days I need to make it solid, but I'm rather close. It's a fork off the 0.8 tarball so it's at least reasonably current.
|
Revisions thus far:
- DDL changes on about half of the column types, switching from MySQL shorthands to SQL92 types. Similarly, KEY(..,..) defs inside tables move to CREATE INDEX statements.
- auto_increment switched to sequences & triggers.
- A goodly sized piece of work moving from MySQL date handling to Postgres, which is at least similar to SQL92. Dates in the SQL flavours are horribly incompatible. At least we get Oracle compat for free with Postgres dates.
- table 'box' becomes 'scoop_box' since 'box' is a PG built-in type. Good design style would have all DDL objects prefixed with a common identifier, so that they may play nicely in a shared namespace/tablespace.
- MySQL's enum is syntactic sugar on check constraints; that's changed.
- DATE_FORMAT() is a MySQLism; Postgres & Oracle & others use TO_CHAR()
Obviously the procedural code above the data model is a simpler task. There are some gotchas I wasn't expecting, though:
- Only MySQL uses double-quotes to enclose literals. I appeal to all here to stop with the double-quoting and follow the standard.
- Dates, dates, dates. Gah!
This is what's done. Over the near future I will be doing some fairly interesting refactoring that should blow the door off kuro5hin's current performance constraints.
Code & patches -- where should I put them?? For the moment they'll accrue on my port 80 site, usually after I write up a bit of documentation.
Anyone have any suggestions, complaints, patches, flames? Post 'em. |
|
Story Views
|
367 Scoop users have viewed this story.
|
|