PostgreSQL 8.0 Released
Christopher Cashell writes "The PostgreSQL project has released version 8.0 of their well known Object-Relational Database. New features include: Win32 Native Server, Savepoints, Point-In-Time Recovery, Tablespaces, and lots more. Downloads are available via bittorrent for Unix/Linux, and the much anticipated Win32 version, or via ftp (use a mirror!)." (Here's the official announcement.)
An adequate replacement for MySQL on Windows. Can anyone say WAPP instead of LAMP?
Great, but why should I use PostgreSQL when I already have a database, you might ask? Here's why.
One of the most exciting features of 8.0 is plperl, their Perl-based server side language, allowing for triggers and persistent storage. On another note, I wish MySQL would catch up to PgSQL. Even if you don't like MySQL, the competition keeps them innovating. If PgSQL is light years ahead, what's pushing them?
Now all I need is a magical installer which will convert my existing 7.2.4 systems to 8.x without missing a single beat or disrupting the existing programs written against the old libs.... I'm serious!
Converting 200Gb of data is not something you want to try do without downtime.
All that said, it's good to see PostgreSQL always improving. Good one guys.
.. but the key issue on Windows is:
Does is have a native Microsoft SQL Server import feature?
The thing is, getting a plain SQL dump out of MS SQL Server isn't possible with version 2000, haven't checked since then though. I'm sure this is a deliberate thing tough...
.: Max Romantschuk
Can anyone explain to me how it is "Object Relational" as opposed to just straight "Relational" or is this just another case of /. bullshit?
Invoicing, Time Tracking, Reporting
Thanks to the postgresql team for providing this great product. I've been using postgresql for a couple of years now, and the release candidates of version 8 for the last month or so. (It's good to finally have a windows port!)
Apart from the initial learning curve, I have exactly zero complaints with postgres - it always does exactly what it says it will. I have no qualms trusting vital data to it. Combined with the excellent pqxx c++ bindings library you can build robust applications with very tightly controlled data integrity - for example (shameless plug) my medical imaging server
Anyways, what are you waiting for? Go download it - you won't be disappointed.
Hi Folks,
Please take it easy on 'wwwmaster'.
'www' fell over a couple of hours ago, and a couple of mirrors are coming online to round-robin the address.
Can someone please change the the first link ("PostgreSQL project") in the story to point to 'www'?
Thanks.
Goodbye Oracle, hello PostgreSQL. Now I can have a mostly SQL92 compliant database with ACID, transactions and now PITR and tablespaces that I can use on the server and on a win32 desktop.
For those of you wanting a great frontend, try PGAdmin3. It works on Win32 and Linux.
MySQL
PostgreSQL
Not only that. Here's the most important link: What's New in 8.0. (To editors: why there are links to torrents, but no link to features?)
Sincerely,
Pan Tarhei Hosé, PhD.
"Homo sum et cogito ergo odi profanum vulgus et libido."
About how much better PostgreSQL is than MySQL, then the MySQL suckers getting all offended and making up sob stories about "using the best tool for the job", and "web pages don't need to be robust".
Comment removed based on user account deletion
I didn't know the goal of Postgresql was to rid the world of windows.
I wrote a PHP program that tracks my gf's and I's finances with a Postgresql database backend.
It's up to about 600 records now and although I wouldn't say it's mission critical it certainly is vital.
I have to say I'm extremely impressed with pgsql. It's easy to use and consistent in what it does. I have no complaints whatsoever. What I like most (although I'm not sure this is exclusive to pgsql) is the fact that I can at any time get a plain text dump of everything in the database in a format that makes sense. If the worst comes to the absolute worst, I can always mess around with awk and write a script which can convert a pg dump to another format. It gives me piece of mind that my data can always be read.
I've heard that ms sql users are not so fortunate - ie no plain text dumps. Correct me if I'm wrong.
Kudos to the pgsql team for such a fine product and keep up the good work!
"And then I visited Wikipedia
It seems to be a temporary message...
Everyone keeps saying PostgreSQL is better than mySQL, but where does it stand in comparison to Oracle? Anyone know?
"Backups are for wimps. Real men upload their data to an FTP site and have everyone else mirror it." -- Linus Torvalds
It may, but it really helps for folks who use Windows and want to run a local copy of their database for development purposes.
Myself, I'm absolutely thrilled wiht this new release (and indeed, their new website -- the old one did look a bit naff). I expect PostGreSQL's popularity to increase a fair bit this year, and good luck to them!
Could anyone give an example of where you might want to use postgresql over mysql and vice versa?
(let ((t (sig. my))) ( cons (cdr t) (car t)))
IMHO, The win32 version is to give people who dabble with MySQL in windows and alternative database.
Congratulations to all developers and beta testers who made PostgreSQL 8.0 possible! Those who download via BitTorrent please keep your downloaders open for as long as you can, so that they can seed the torrent to others.
Does oracle have similar problems?
PostgreSQL is object oriented, in that you can store objects rather than your normal flat table/row data layout scheme used by most databases.
This is covered in most introductory books on postgresql, I suggest you try it out! :)
James CarrI have heard great things about PostgreSQL, and a buddy of mine recently told me that this release was pending.
.pkg installation file?
One thing I'm not keen on though is tarball distributions. I don't want to have to compile the thing, I just want to grab a package for my platform and install it (just like I do with MySQL).
My favoured platform though is Mac OS X. There's a whole list of platforms in the FAQ, but Mac isn't amongst them.
So my questions are is Mac OS X supported, and if so are there any plans to make a Mac OS X
What happened to the big news about the Java stored prodcedures? Wasn't there some news not to long ago about adding support for this in Postgres? To me that would been a more welcome feature than the rest of the stuff.
Comment removed based on user account deletion
I hate it when MySQL fanboys jump into threads like this only to show their ignorance of relational algebra and predicate calculus saying that no one should ever bother with PostgreSQL and ACID-compliance, because MySQL is somehow a "better tool for the job" in the "real world". We already have comments saying that, so people, please read this first: [1] [2] [3] [4] [5] [6] [7] before you post yet another misleading plug for your favorite toy. Thank you. A real relational database is more than just a data store with SQL frontend.
Does it have replication through some mechanism that is free or close to. (Please don't answer with obscure link to work in progress).
Does it need vacuum still? Can I run it 24/24 with load 365/365 without ever having to block access to a single table?
For example, exceptionally poor performance of aggregates like COUNT(*), relatively weak optimizer.
See Wiki entry for more.
Are there similar problems with oracle
or other "top of the line" database systems?
LAPP, maybe, but certainly not WAPP.
Linux + Apache2 + PostgreSQL + Python == kickass webserver
I support the Center for Consumer Freedom
Good to see they're back in the race, coming up with something serious - and Thanks, Oracle! for being a tough competitor providing a solid standard to keep up with. PostgreSQL is, in my opinion, the most presentable of not-too-much-$ database solutions, I sure like to present clients with a new version of P rather than the crummy image of MySQL (by no means an inferior product but not profiled in the same, serious way). Ah and let's see how it runs on Mac OS/X - Darwin, too. Maybe my little 12" will become all the more a p0w4hful tool because of it - and it had better, I haven't paid the thing off, yet! ...
* Signal 15... "Ceterum censeo Microsoftem esse delendam." Cheers cq. BRgds: DrS aka UNIXmafia@ribeco.net
... and it would really really rock!
Said that, PostgreSQL is a really great thing, and being FOSS, I could of course always go ahead and add the named features... .)
Just when I get about ready to start another project with MySQL, another bit of news about Postgres comes along, making me wonder if I should make the switch to a "real" RDBMS. After all, if I want to be a professional developer, I should be using "real" tools, not "toys", right? OTOH, I can find more references and resources for help if I go the MySQL route, making my life easier. Dilemmas, quandaries, decisions, oh my!
Constitutionally Correct
Can anyone say WAPP instead of LAMP? Maybe.
Can anyone say database instead of data store? YES.
Can anyone say WAPP instead of LAMP? Maybe.
Can anyone say database instead of data store? YES.
(Sorry for the broken link in my previous post.)
I've done a little bit of work with different DBs (Oracle 9i/10g, db2, Ms SQL 2000, MySQL, and some will laugh, Access) ... and as far as I know, they're not OOP DBs. If they're not, then whats the advantage of an OOP Db compared to everyone else?
SQL Server may have some missing functionality, but plain text dumps work perfectly well (albeit you might need to do them one table at a time). They're also incredibly simple to do.
Most of Microsoft's products may be crap, but SQL Server does seem to be an exception to the rule. All in all it works pretty well in my experience. However 9/10ths of SQL Server deployments would probably be just as well off with PostgreSQL. :-)
PGSQL has its own gotchas. For example, exceptionally poor performance of aggregates like COUNT(*), relatively weak optimizer.
Who needs correct data if you can have incorrect data Real Fast? Riiight.... Have you ever managed IMPORTANT data? No? It shows.
Check out the new Slony replication engine:
http://www.slony.info/
It is probably the best master->slave data replication engine for PostgreSQL at the moment. It is free and developed by one of the core developers.
Especially the ability to ALTER TABLE "x" RENAME TO "Y"; (!)
Yes mySQL has been able to do this for a while, I got sick of exporting out the data and re-importing, but now we dont have too!
It might be also a good time to mention that EMS have released Lite versions of their product that are free. (pgsql, mysql, mssql and interbase)
Although I'll probably end up buying a non-commerical license to support them.
Check it out here: http://sqlmanager.net/news/607
It's just Linux Apache Mono PostgreSQL
For up-to-date web-based administration of PostgreSQL, try phpPgAdmin:
http://phppgadmin.sf.net/
The dirty secret is that Postgres is actually easier to install and administer than mysql. I don't want to get into a religious argument with mysql users but ... oh hell yes I do.
I have worked with self-educated programmers who did not know how to do simple table joins or even modestly complex SQL queries or transactions, because they had learned what they thought was SQL by using Mysql. There is a whole generation of developers who now think that transactions aren't really necessary in a database application.
Postgres is really an Oracle killer at this point, and I know, having used Oracle. There is quite simply no reason to use any other relational database at this point, especially to back a live web site.
Well, the gig was up after everyone figured out that Postgres-R was just Postgres with a big muffler and wing.
Please help metamoderate.
Some people say that providing open source applications on Windows helps proprietary software and the Windows monopoly, but I don't think so. Software like Apache, PHP, PostgreSQL on the server, and Mozilla Firefox, Thunderbird, and OpenOffice on the client lets Windows users gradually move over to open source applications. I think that's a much better way of getting people to switch than to ask them to do an all-or-nothing switch.
Actually it's good to be wrong when you get the chance to learn something in exchange.
ich bin der musikant
mit taschenrechner in der hand
kraftwerk
As a seasoned PostgreSQL user I'm very excited about this release, I especially like the new Savepoints feature (described in this article). This wonderful feature finally makes it possible to roll back only part of a transaction. Sweet!
I expect this to take more of MSSQL's market share on the Windows space...for organizations that can't yet stop using Windows, but don't want to shell out for a database if they don't have to.
Don't they know that MySQL is the one to use for web backends? :)
We got up early to provide customers with the full release before they started their workday. :-)
PostgreSQL 8 Hosting!
Robby Russell
PLANET ARGON
Robby on Rails
I mean it sounds great and all but maybe its a case of 'better the devil you know'..
But does the slony ebuild work yet? :)
Get your own free personal location tracker
Slony1, open source postgresql replication!
Robby Russell
PLANET ARGON
Robby on Rails
For lite uses, and many heavy ones, SQLite seems excellent. I haven't used it yet, but whoever writes for the project is an excellent communicator.
In my experience, most open source projects, and almost all commercial products, have a (maybe mostly unconscious) plan: "We will carefully measure how much hassle people will accept, and make sure we don't document anything more than enough to just barely keep people from rejecting us."
It's common to visit an open source project and find that, yes, they have a new version, but the manual is two years old. There are plenty of commericial projects that are the same way, like Netgear's FVS318. Their reference manual is for version 1.4, but the latest version is 2.4.
An advantage of open source projects is that they are usually far more honest than commercial projects. I love this from the PostgreSQL What's New page: "Although tested throughout our release cycle, the Windows port does not have the benefit of years of use in production environments that PostgreSQL has on Unix platforms and therefore should be treated with the same level of caution as you would a new product." Marketing people are generally so dishonest that they would not allow an honest statement like this.
MySQL is a non-standard implementation of SQL. That's a problem that's probably partly caused by not doing good documentation. If they had documented everything as they wrote MySQL, they might have seen what a mess they were making. Bad documentation obscures programming messes.
PostgreSQL has an elaborate documentation system, and the new features are very impressive.
I don't do database stuff anymore but, looking back, it seems to me that every design I worked on could run on PostgreSQL, now that it has tablespaces. It's a useful design feature but perhaps more importantly, people now have a really good tool to do performance tuning with really large databases. There aren't any other OSS databases with tablespaces as a feature, AFAIK.
Now before I get modded down, I be to remind whoever might read this that what I am saying is FACT. - bogaboga
Postgres has a big (well, almost) company behind it too, now.
Don't forget plPHP:
plPHP
Robby Russell
PLANET ARGON
Robby on Rails
Oracle...
Short answer:
RDBMS != Object Store ergo Object Relational Database == Bullshit
Long answer:
It's true that an RDBMS doesn't map well to the object-oriented ideology. That's because an RDBMS does not store objects, or anything like them.
The object-oriented ideology as instantiated in C++ and Java is founded upon breaking data into objects, bearers of identity, which belong to classes, bearers of structure and behavior. (C++ and Java make little account of metaclasses, which are used in more dynamic object systems such as Python's class system and Common Lisp's CLOS. Templates are not metaclasses.) Objects have identity, so they can be equated; they are the unique bearers of attributes about themselves; and each object's structure is dictated by the class to which it belongs.
When object-oriented partisans look at a database, they see its relvars (or table headers) as bearers of structure and think of classes, and its tuples (or rows) as bearers of identity and think of objects. They see a database as a place to store objects persistently.
But this is not what an RDBMS does. An RDBMS isn't an object store; its relvars are not classes and its tuples are not objects. So what is an RDBMS? What is "relational" anyhow? Relational databases are founded upon relational mathematics, which is what you get when you cross set theory with predicate calculus.
Set theory is the branch of math that deals with collections of elements which behave according to formal axioms. Set theory lets you say, for instance, that if you have a non-null set R and a non-null set S, that you can construct a set R*S of all the possible pairs of elements from R and S.
Predicate calculus is the branch of logic that deals with quantified statements about entities. It lets you formalize logical arguments such as the syllogism: All men are mortal; Socrates is a man; therefore, Socrates is mortal. Predicate calculus deals with generalizations and instantiations of those generalizations.
What do we get by combining set theory and predicate calculus? We get a system that allows us to operate upon sets of tuples of values satisfying predicates. A relation holds tuples of values which make some predicate true. For instance, consider the predicate "Person x owes me y dollars." Tuples which satisfy this predicate will be pairs (x,y) for which the sentence is true. For instance, if Fred owes me 40 dollars, (Fred, 40) satisfies the predicate. It could thus be a tuple in the relation described by the predicate -- the one relating people's names to how much they owe me.
With the relational algebra (or an RDBMS) we can do operations upon this relation and others. We could, for instance, select a result set of all those people who owe me more than 50 dollars -- or join this result set with those people's addresses. Whatever result set we ask for will be calculated from the facts in the database. We might get back this result set:
(Barney, 75, 40 Elm Road)
(Megan, 60, 9 High Street)
Now, are the elements of this result set objects in the object-oriented sense? They are not. They do not have identity. The tuple about Barney is not Barney himself, or even a machine representation of him. It doesn't uniquely store attributes of Barney -- after all, we created it by joining tables which also contain such attributes. It is not even, truly, a fact about Barney exclusively -- for it is also a fact about the number 75, and about the address 40 Elm Road. It isn't an object; it's a tuple value, and values do not have identity as objects do.
Moreover, note that by joining, we can construct new relations from old one
Does the Windows version still require running as an administrator?
The Glass is Too Big: My Take on Things
Pervasive, the company that previously brought Btreieve, provides commercial support for PostgreSql 8.0. I believe, this is the first "database" company that provides support. You can find the news at http://www.pervasive-postgres.com/ Hopefully, this should enable penetration of postgres into more established enterprises. Disclaimer: I submitted the story before and it was rejected.
There's also some new commercial support offerings from an established database company. Pervasive started offering a distribution recently.
"I am not a number! I am a free man!"-- The Prisoner
Yes, Postgresql is fabulous. I use it daily.
But what about OSS projects such as Bugzilla, blogging, CMS, etc. which only support MySQL. When are they going to add support for Postgresql ?
This sounds like mysql's binlog feature.
Hopefully this will make it easier to make a kickass replication engine for pg.
Point-In-Time Recovery
In previous releases there was no way to recover from disk drive failure except to restore from a previous backup or use a standby replication server. Point-in-time recovery allows continuous backup of the server. You can recover either to the point of failure or to some transaction in the past.
Last.fm - join the social music revolution
When will someone graft something like Tomcat or JBOSS into Postgres? I want my Object Relational DB to do something like:
(
SELECT p.person, m.show
FROM people p, subscription s, status t, media m
WHERE s.address=p.address
AND p.id=t.person AND (NOT t.state=expired)
AND m.id=s.media
).iterate(m.send(p.person));
Not only relate the objects in the tables, but internally retrieve Java objects, pass them to the VM, along with the messages and data to call, from the resultset. I also want every object to be related, so resultsets records can include fields which point to running objects, and running VMs. Who's got it?
--
make install -not war
playing around with the beta and RCs several items impressed me:
1) GIS support. Very important for what I do. This is probably due to how closely they work with GRASS (which I haven't used yet).
2) Ability to define and bind operators. Very flexible.
3) Much more relationally compliant while also supporting OOP.
4) PGAdmin II is very handy. A few rough points but now there is no excuse for those afraid of a command line.
It just gets better every release. I am currently porting a MMSQL database over and so far so good.
putting the 'B' in LGBTQ+
Oracle will always have more features than any other given database product you care to compare it to, and there will always be those who find some of those Oracle-unique features irresistable. That's what it means to be the central product of a very large, wealthy and reasonably effective software company.
It is not a very meaningful comparison, though. Oracle also has a lot of stuff that nobody would be happy to see tacked on to PostgreSQL. Oracle is notoriously difficult to administer. The download of Oracle's database product is probably 500 times larger than PostgreSQL. (and 20 times larger than Oracle itself was just a few versions ago, which is interesting, and yes I'm guesstimating but still...)
In short, PostgreSQL doesn't need all the features of the Oracle db to be successful, as *nix and NT did not need all the features of a mainframe OS to be successful.
Now before I get modded down, I be to remind whoever might read this that what I am saying is FACT. - bogaboga
Now wanting to develop a database system for an internal intranet for a business to run an OSS CRM or ERP solution, unless specifically developed for and only for MySQL, PostgreSQL's fetures are ideal especially since the ratio of selects vs other queries are not going to be like hosting a website CMS.
The /. crowd always seem to want to make things "This is better than that" and vice-versa rather than "there is the right tool for the right job".
"The problem with socialism is eventually you run out of other people's money" - Thatcher.
OnLAPP! Finally, the Life of O'Reilly becomes worth imagining.
--
make install -not war
This is a GREAT comment explaining what relational DBs are all about and what's wrong with the recend OOPDB buzz. Please MOD PARENT UP.
SQL is a very basic standard, and is quite useless for writing stored procedures. This is why MS has their TSQL, oracle has their PLSQL, and postgresql is nice enough to have PLPGSQL, perl, C, and others.
If you spend any amount of time at MetaLink, you'll see that Oracle has just as many gotchas as any other DB.
Will postgres handle case insensitive string comparisons in the where clause? Yeah its broken behavior, but there are apps(including ones I work with) that can not use postgres because of it.
Pain In The Rear?
120 chars are not enough for a signature. I have discovered a truly remarkable proof which this margin is too small to c
If there is a unique key (like an ID), it should be able to automatically use that for counting - but it doesn't.
Stop the brainwash
PostgreSQL vs MySQL: Which is better?
And here is a 3-point summary for the impatient:
MySQL versus Postgresql (summary)
Why can't you dweebs understand? No matter how fancy you make your OS X^M^M^M^MpostgreSQL, those of us that prefer to use filesystem^M^M^M^M^M^M^M^M^M^MmySQL as database will never switch.
Must-not-watch TV!
If only a simple and integrated replication mechanism would appear, I would consider switching back to PostgreSQL from MySQL.
I miss PostgreSQL, but too many things are made easier by replication.
In other words, Postgres scales in simple cost, while MySQL scales in complex cost. Simple cost problems can usually be solved with more money. Many complex cost problems can't be solved with any amount of money. Simple cost problems don't contribute to the risk, except where more money can't be raised, while complex cost problems directly increase the risk to everything. You can't fix complex cost problems "in the mix" - you're actually "starting over" when you change some of the factors, or their relationship. Give me simple cost problems, except when I can't afford them at all - a risk of 0 is best, then some risk, but preferable to a risk of 100%.
--
make install -not war
Zealots are the #1 problem with the open source community. Who cares whether someone is using MySQL or PostgreSQL? AT least they aren't using MS SQL.
"Affects: PostgreSQL
A config variable disables this misfeature.
Two calls to random(), which is declared as a 'volatile' function _should_ return two different functions. You could, of course define your own function that is not-"volatile" and get the behavior they wanted.
This page is a great reference for where Postgresql, Oracle, DB2, and others fail to conform to the SQL standards.
While I think that PostgreSQL is the best open source database out there, there is one very important gotcha wrt: MVCC which can cause data integrity. This only happens when autovacuum is not running, of course.
If you run enough transactions between vacuum runs (iirc a billion), the transaction counter will wrap around and suddenly your data does not have a consistant point of reference regarding visible transactions. Now, if you wait for a billion transactions to run VACUUM, you either:
1) Have extremely poor performance anyway (not to mention having all your stats off so the planner is doing seq scans when it should use an index)
2) Are doing something with the database which I cannot imagine (I guess a huge number of select statements could cause this, but updates cause old tuples to sit around, so you would have bad performance).
Now, I am not aware of this ever actually having happened, but it is in the documentation, so I figure I should point it out. Of course if you let the database get to this point, then you have bigger problems than your data (chief among them being the IT staff and/or management)..
In general, PostgreSQL focuses on data integrity to a degree not seen elsewhere in the open source database world. Even Firebird does not have such a heavy focus in this area, though to be fair it is a different enough product that their focus works well in their target markets.
My company offers application development, remote administration, and implimentation services for PostgreSQL, MySQL, and Firebird. I am very excited about this release because it will enable us to do more with the database manager which makes us most productive.
As a side note, PostgreSQL-Win32 will not run on Win9x because it requires an NTFS filesystem, iirc. So it is not a perfect solution for Windows development yet (until Win9x fades into the distance or until they decide that they should port it to FAT). Of course you could still use the Cygwin installation, I think. But it is better, IMO, to run it on a arguably stable system anyway.
LedgerSMB: Open source Accounting/ERP
Before, to do this, you had to create a temporary table with the changed column type, copy all the data over to it, and then rename the temp table as the old table.
Thank you Postgres team! Now, if we can rename a column, that would be a nice bonus.
You're telling me that MySQL locks the entire table when I insert a row? You must be joking - that would bring a database to it's knees.
I'm an Oracle guy, and this is how they do it:
Oracle has the best technology in the industry, hands down (DB2 didn't even get triggers until v5). Postgres appears to be paying much more attention to Oracle's methods than MySQL.
Guess which database I'd use if I had no money to spend?
There are a lot of very negative-thinking people who make comments on Slashdot. I have used SqLite, but not in production software, only to try it.
And, I should say SqLite is very impressive for many of the small uses of databases, or places where people should use databases, and haven't because of the complexity of the other ones.
You can use Java as a stored procedure language in Postgres.
One of the missing features in MySQL programming is the lack of IF statements. Using Microsoft SQL Server 2000 I can do just about anything in a query, including testing to see if something exists. Is there a way to do the following in MySQL with a single query?:
1) insert a row if it dosn't exist, or update one if it does?
2) insert something with automaticaly generated Private Key value, read that value back and use it to have another record in another table point to the record you just made?
ReadThe ReflectionEngine, a cyberpunk style n
600 records?
What you're doing is more commonly done using a spreadsheet like Excel or OpenOffice, a high-end database like postgresql is totaly overkill for your project (not that they'res anything wrong with that, I'm sure it was a fun learning experiance).
The ability out output a plain text is universal in spreadsheet programs, as far as I know. And Microsoft's SQL enterprise manager can output plain text copies of your database.
ReadThe ReflectionEngine, a cyberpunk style n
I converted a fairly large db (~15 million rows in 100+ tables) from MS SQL Server to postgres using EMS's PostgreSQL Data Pump software. It's not free, but it's cheap, and saves you a LOT of trouble. You can find it at http://www.sqlmanager.net/products/postgresql/data pump.
We still had to re-write all of our stored procs as postgresql functions, but that was a pretty good learning experience and enabled us to trim some serious fat as well.
I had a similar issue with an Oracle database at work. We "defeated" the DBAs (their unwillingness to lift a finger on our behalf or grant us access to much of anything even in development) by writing a little java program to get an JDBC connection, then "select * from $1", puking out a list of inserts with an occasional commit. Wrap this in a little script to get each table (yes, if I were really gung ho I would have made the java program start a transaction, then pull an array of tables for consistancy). Thus, we were able to back up the production database and re-import it into development.
Assuming no more than minor changes to the insert statements syntax, and JDBC driver for database of the day, this should allow you to port data without too much fuss. (e.g. - me replicating the production database by piping said insert dump-scripts through psql)
I realize I'm replying to a joke post, but the data extraction issue is a recurring nuisance.
Yow! I'm supposed to have a plan?
Empty strings are stored as nulls (or is it the other way around). These aren't really the same thing, and can lead to issues if, for example, you use an empty string to mean "no data" and a Null to mean "unknown."
LedgerSMB: Open source Accounting/ERP
It seems that people consistently prefer PostgreSQL over MySQL (which I currently use). I use my database for things like trying out CMSs on my personal server (definitely not mission-critical!) and storing my music collection for amarok. Is there some way I can use Postgre for all these MySQL-only things? I want to try it, as MySQL seems kinda... old.
This guy is obviously of the opinion that everything should work on the same principles that ORacle does. Hence no Oracle gotchas.....
A couple of the MySQL gotchas (while problematic) are a bit misleading. Except in Oracle, an empty string and a NULL are different, and in relational theory, these have different meanings. While I think that it is unacceptable for MySQL convert NULL's to distinct types to match the constraints set on the database, it is not an issue of it inserting NULL's but rather inserting empty non-null values (empty string, for example). This is serious but it is an altogether different (and, I believe, more serious) problem.
LedgerSMB: Open source Accounting/ERP
http://shit.slashdot.org/article.pl?sid=05/01/19/1 312224
http://blog.planetargon.com/archives/36-Installing -PostgreSQL-8.0-alongside-7.4.html
Robby Russell
PLANET ARGON
Robby on Rails
What are you smoking, and where can I get some?
Linux + Apache2 + Mod_perl + PostgreSQL
Just because it CAN be done, doesn't mean it should!
I'd love it if I could do some real object oriented storage with PostgreSql, but with the way it's currently implemented, I haven't found it all that useful... at least for what I want.
In particular I fell into a serious trap, partly as a consequence of not reading the documentation properly. It turns out that although the sub-tables will inherit properties from the super-tables, the data and any indexes are stored entirely separately.
Consider the following, for instance. You have a table to represent something like "places". Each has an ID, a name and a population, with an index on the ID. Perhaps this is inherited by other tables to represent things like "villages", "cities", "rivers", whatever, all representing their own information. Then load the tables with all of the relevant information, perhaps millions of records.
At this point, you can select from the "places" table to get a complete list of ID's an names. The problem is that, because the data is stored in all of the individual sub-tables, the "places" table still has zero records in it. (Unless you've explicitly inserted them into that table, of course.) When selecting from the "places" table, postgresql will query all of the tables derived from it, union them together and provide a virtual view. This means a tablescan of several tables upon any select.
In particular, if you plan to look for a place with a particular ID and do a few joins to other derivitive tables, everything slows to a crawl as the asymptotic complexity of all the unions and joins involved becomes exponential.
Anyway, I'd designed a database like this without realising, but eventually converted it back to a regular relational database. Apart from semantics, there just didn't seem to be any big advantage to it and there was a huge cost with anything more than a trivial amount of data involved.
I'm sure it is useful for some things, but the way it's currently managed (and it's possible this has been changed in 8.0) means that it's not suitable for a lot of tasks that people might otherwise assume it is.
Oxford University announced a while back that they will be scrapping most of their proprietary DBs for PostgreSQL over the course of '05:
http://news.zdnet.co.uk/software/applications/0
I'm rather excited by Slony. And it's nice to know the road-plan for Slony.
Does anyone have experiences with that?
However, multimaster or not is one parameter for replication. Another is if replication is synchronous or asynchronous; and it's my impression that synchronous replication will not be in Slony any time soon (I could be wrong, though).
And then I stumbled across http://www.csra.co.jp/~mitani/jpug/pgcluster/en/
Unfortunately, now the pendulum's swung the other way and we find ourselves with staggering persistence layers like EJB that wind up making it almost impossible to use a database's native features.
People rely on these persistance because they don't understand what a relational database can offer the, Often they are only interested in being able to persist objects across a set of uses (for example, a set of page views in a web app). These persistance layers in general are not good at gathering and maintaining meaningful data for business purposes. Indeed, why should I use an SQL back-end for this sort of app when something like Berkely DB is closer to what I want to start with? No wonder MySQL is so popular....
The real power of a real RDBMS is in its ability to store, manage, and present meaningful data to applications that can then use them as they see fit. This means that if you need a real enterprise app, you should start with designing your database to hold the appropriate information in a meaningful way, and then write object wrappers around this. You can then have custom actions on insert/update/delete using triggers (custom actions on select statements in PostgreSQL requires using a view). THen you can write an object-oriented app to use this structure.
I don't trust persistance objects to store meaningful information (sometimes you have to have a break between a logical and physical storage in order to keep the data meaningful).
LedgerSMB: Open source Accounting/ERP
Yes, wow, finally get to meet you, my idol, my hero, you! Your design is divine! There hasn't been any changes in years now. We just add new functionality on what you have architected. Thanks for making our living. We owe you some. What's your bank account number? we need to send you 15% of our pay, using your auto-recover-self-commit fund transfer(tm) module, of course.
Gratefully yours,
Martin A.
That's a better comparison IMO.
Anyone have experience with both?
I run no Microsoft products at home. I only look for Unix jobs. DTS is one of the coolest and most useful products that I've used in the last fifteen years.
DTS is just about the only reason to install MSSQL. I first used DTS back in the MSSQL 7 days. A client had an old multi-gigabyte dBase database they needed to migrate. The new database was MSSQL, but the schemas had all changed, all of the old constraints and triggers were in the application code. Using DTS, it took me a week.
I don't use SQL Server for databases -- just for DTS. I'm well aware that various ODBC drivers can munge things up. I'm sure that there are many pitfalls that I've managed to avoid. But DTS just rocks.
If I'm working with a client that has Microsoft products -- and most of them do -- I always suggest using DTS for data migrations. Even if the have to buy a license. (Yup, it's that good).
If you can get Windows to talk from one system to another via ODBC -- or programatically -- DTS makes data migration almost easy.
By far, DTS, is the best MS product that I've ever used.
It's not as you described. Here's a test I did in PSQL.
forum=# create table TestTable (KeyID serial, SomeName varchar(10))\g
NOTICE: CREATE TABLE will create implicit sequence 'testtable_keyid_seq' for SERIAL column 'testtable.keyid'
CREATE TABLE
forum=# insert into TestTable (SomeName) values ('1234')\g
INSERT 42062883 1
forum=# insert into TESTTABLE (SOMENAME) values ('5678')\g
INSERT 42062884 1
forum=# insert into TeStTaBlE (SOmeNAme) values ('abcd')\g
INSERT 42062885 1
forum=# select count(*) from TestTable where KeyID = 1\g
count
-------
1
(1 row)
Where you get the case sensitivity issue is if your app already does the quoting around the names. Or you need the return fields to have mixed cases.
Why is this important to anyone? Sounds like a mission.
I understand the goal of offering alternative, competing products, but I just can't see what good it serves to "get revenue from Oracle."
Yes, MOD PARENT UP.
However, recognize that it was copied from an earlier discussion on Slashdot, and it is valuable to see the entire discussion. You might not otherwise click on the link at the bottom, which references that earlier discussion.
Some here may not appreciate MySQL. On the other hand, for one of the top 100 English language sites and one of the top 200 in all languages, according to Alaexa.com, I see around 200 million queries per day on MySQL,combined with some 250,000 edits/posts (many updates per edit) per week. For this application. MySQL definitely gets the job done. Each has strengths and weaknesses, though - and each is also stronger and weaker than other database products as well.
The earliest version of PostgreSQL with which Slony-I is compatible is version 7.3.3. That's because Slony-I needs namespace support, which didn't really solidify until then.
Rod Taylor has reported that he "hacked together" a version for 7.2, but the only way I'd be inclined to use that is if I was paying Rod to set it up...
When I did upgrades of 7.2 systems to 7.4, I used eRServer, a Java-based replication system from which Slony-I inherited many of its design ideas. (The name "Slony" is a conscious nod to Vadim Mikheev, one of the main creators of erServer...)
I'll have to add documentation on how one would do this to the Slony-I FAQ ...
If you're not part of the solution, you're part of the precipitate.
Pudge has me foed, and thereby doesn't allow me to participate in his journal discussions, but you might want to point out this to him in his and your thread.