Re: [GENERAL] PGSQL Newbie
Wolfe, Robert [EMAIL PROTECTED] writes: Good morning all! I'm a newbie to PGSQL here so thought I would ask my first question since I joined this list this morning... Is it possible to run Postgresql and MySQL together on the same machine? Sure, my development machine is setup this way so that I can write code to migrate away from MySQL. Jason ---(end of broadcast)--- TIP 3: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faq
Re: [pgsql-advocacy] [GENERAL] Oracle buys Innobase
Tom Lane [EMAIL PROTECTED] writes: Jim C. Nasby [EMAIL PROTECTED] writes: Of course, Oracle could tank the market by offering support at un-competitive prices, but I can't think of a reason for them to do that off the top of my head. They might hope that they could drive the existing support companies out of business (assuming they didn't get convicted of antitrust violations first --- which would be an open-and-shut case, but with the Republicans in office they probably wouldn't get prosecuted :-(). Then they raise their rates to make lotsa money, or maybe they'd think they could drop support at that point and the project would die for lack of commercial support. (They seem to understand open-source poorly enough that they might think that would happen.) It takes a lot more money to keep Oracle running than it does to run Command Prompt or Red Hat. If Oracle started offering support for PostgreSQL at rates that were low enough to be competitive with the current PostgreSQL support companies they would be cutting their own throats much faster than they would be cutting yours. Oracle requires much higher profit margins to survive than the PostgreSQL community does. Every single Oracle customer that shifted to PostgreSQL would hurt Oracle's bottom line, even if the customer opted for Oracle support. I don't see any of this happening though. As suggested upthread, the very *last* thing Oracle wants is to raise the visibility and credibility of Postgres by a couple of orders of magnitude --- which is exactly what they'd be doing by offering support for it, even if the support was only temporary. The effects of getting the word out would persist long afterwards. regards, tom lane Exactly. If Oracle promoted PostgreSQL, even momentarily, lots of Oracle customers would at least take a look, and many would like what they saw. PostgreSQL has suffered quite a bit from being in MySQL's shadow. I know lots of savvy database developers that simply assumed that PostgreSQL must be a nightmare because they took a look at MySQL (the most popular Free Software database) and were horrified. Jason ---(end of broadcast)--- TIP 2: Don't 'kill -9' the postmaster
Re: [GENERAL] Oracle buys Innobase
[EMAIL PROTECTED] writes: On Sat, Oct 08, 2005 at 10:31:30AM -0500, Scott Marlowe wrote: What it comes down to is this. MySQL is dual licensed. You can use the GPL version, or the commercial version. In order to sell the commercially licensed version, MySQL must have the rights to all the code in their base. So, in order for MySQL to sell a commercail version of MySQL with innodb support, they have to pay innobase a bit to include it, or rip it out. I don't understand. If both MySQL and Innodb are GPL licensed, commercial or not should make no difference, and they can add all the GPL changes they want o the last Innodb GPL release. Yes, that is correct, MySQL can still distribute a GPLed version of MySQL that includes InnoDB no matter what Oracle might do. However, MySQL AB's current business strategy relies heavily on being able to sell MySQL under a commercial license. If Oracle changes the deal that MySQL AB has with InnoBase then it will be impossible for MySQL AB to sell a version of MySQL with support for InnoDB tables under a commercial license. All of MySQL's fancy new features revolve around the far more capable InnoDB tables. Without that table type MySQL reverts right back to the toy it was at version 3.2. MyISAM tables lack ACID transactions, row level locking, hot backup ability, and basically everything else you would want out of a database. Oracle now has MySQL AB over a barrel. I imagine that when it comes time to renegotiate the InnoBase license next year that the balance of power in that relationship will shift dramatically. What am I missing? What you are missing is that MySQL AB the company and MySQL the database are two different things. MySQL the database will still be distributable under the GPL, but even MySQL AB isn't going to be able to distribute MySQL with the InnoDB table type under anything but the GPL if Oracle yanks MySQL AB's license. Of course, it's entirely possible that Oracle isn't planning to torpedo MySQL and that the InnoBase/MySQL AB relationship will remain unchanged, but this news has got to make MySQL AB's commercial customers nervous. Jason ---(end of broadcast)--- TIP 2: Don't 'kill -9' the postmaster
Re: [GENERAL] Oracle buys Innobase
[EMAIL PROTECTED] writes: On Sat, Oct 08, 2005 at 02:11:54PM -0700, [EMAIL PROTECTED] wrote: What am I missing? [ many answers ] Ahhh ... I did not realize they were selling a commercial version with a dual license. I had thought they were selling support contracts. I confess I find this weird too. I can't see why someone wouild want to distribute their own private label version of MySQL, unless they were making significant changes, and then I can't see why anyone would want to buy such a version. But I have met many people, not just corporate types, who think $0 = worthless, and $$ not as good as $$, even for the exact same piece of gear. That's part of the reason that MySQL AB went around to all of the MySQL database adaptor guys and hired them and changed the license on them to the GPL. There were lots of people that wanted to include a database with their software and LGPLed drivers let them do that even if the database itself was under the GPL. Now with GPLed drivers for MySQL if you distribute your application you either need a commercial license of MySQL or you need to GPL your application. MySQL made a pretty penny convincing application writers that they needed a commercial license of MySQL if their application wasn't distributed under the GPL. It wasn't about support contracts per se, but rather about being able to include an inexpensive database with a commercial application. In some ways that actually shouldn't be a problem since the drivers are the part get gets linked with the commercial application, and they are still owned by MySQL AB. However, it's going to look funny if MySQL AB has to offer MySQL itself under the GPL in order to include InnoDB tables and they simply sell the database drivers under a commercial license. Any way you look at it, there are interesting times ahead for MySQL AB. Personally I think that it is just Karma. After years of disinformation they are getting what they deserve. Jason ---(end of broadcast)--- TIP 2: Don't 'kill -9' the postmaster
Re: [GENERAL] Help with tools...
Cristian Prieto [EMAIL PROTECTED] writes: I've tryied with some tools as pgEditor and EMS PostgreSQL Manager, but I need a really good pgsql and database Editor to use in Linux or Windows. Options? Have you take a look at pgAdmin III? http://www.pgadmin.org/ What sort of features are you looking for? Jason ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster
Re: [GENERAL] Foreign keys?
It was a little bit late when I wrote that, and so I probably should have been a little more specific. I don't know if you would notice a performance difference between the joined tables query and and the non-joined version for such simple tables. I might have to spend a bit of time today loading a test database with sufficient data to test it, because now I am curious. However, I know that if your tables are more involved than the trivial ones that I included that it can make a big difference. This is especially true if you want to join a table to several lookup tables. In those cases it is a serious performance win to have the data in the master table and simply use the lookup tables to guarantee that valid data is entered. By the time you have a query that looks like this: SELECT users.name, states.name, institutions.name, divisions.name, trucks.id from users, states, institutions, divisions, trucks WHERE users.state = states.id AND users.institution = institutions.id AND users.division = divisions.id AND users.truck = trucks.id AND users.id = 'MYID'; PostgreSQL is going to wish that you had put more of that information in the users table. A view might make the query easier to type, but it won't undo the performance penalty of multiple joins. At least that is how I understand it. I might be wrong, however, I never have pretended to be a SQL guru, but I certainly noticed a performance difference when I switched from a table with multiple joins to one with more of the information directly in the table (it still referenced primary keys in another table, they just were varchar primary keys and not ints). Jason --- Richard Huxton [EMAIL PROTECTED] wrote: From: Jason Earl [EMAIL PROTECTED] However, if you are going to do a lot of joins on your user table along the lines of: SELECT user.name, object.description FROM user, object WHERE user.number = object.owner; Then you might be better off simplifying just a bit to give you something like: CREATE TABLE user ( name VARCHAR(400) PRIMARY KEY ); CREATE TABLE object ( owner VARCHAR(400) REFERENCES user NOT NULL, description VARCHAR(200) ); That would save you having to join the table to find the user.name at the expense of using more hard drive space. I'm curious - are you speaking from a performance viewpoint here, or just about simplifying queries (in which case I'd just slap a view on top)? - Richard Huxton ---(end of broadcast)--- TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED] __ Do You Yahoo!? Get personalized email addresses from Yahoo! Mail http://personal.mail.yahoo.com/ ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster
Re: [GENERAL] autoincrement???
You could either try: CREATE TABLE address ( address_id int SERIAL, street VARCHAR(40), zipcode INT, city VARCHAR(40), country VARCHAR(40) ); Or you could do the same thing yourself manually with: CREATE sequence address_id_seq; CREATE TABLE address ( address_id int PRIMARY KEY DEFAULT nextval('address_id_seq'), street VARCHAR(40), zipcode INT, city VARCHAR(40), country VARCHAR(40) ); I personally like the latter as it is slightly more flexible. Plus, I often create large SQL scripts to rebuild the database schema when I am developing and the longer way reminds me that I need to drop the sequence before creating the table :). Jason --- Markus Jais [EMAIL PROTECTED] wrote: hi I have the following problem: I create the following table: CREATE TABLE address ( address_id int PRIMARY KEY , street VARCHAR(40), zipcodeINT, city VARCHAR(40), countryVARCHAR(40) ); Now, I want the address_id to get incremented every time I insert a value into the table. for example: INSERT INTO address VALUES('mainstreet 12', 85253, 'munich', 'Germany') ; without specifying a value for the id. a friend told me, that this works in MySQL with something like auto_increment. I do not know much about MySQL so I do not know if this is true. Can you please tell me, how to do this in postgresql thanks a lot regards markus -- Markus Jais http://www.mjais.de [EMAIL PROTECTED] The road goes ever on and on - Bilbo Baggins ---(end of broadcast)--- TIP 3: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your message can get through to the mailing list cleanly __ Do You Yahoo!? Get personalized email addresses from Yahoo! Mail http://personal.mail.yahoo.com/ ---(end of broadcast)--- TIP 2: you can get off all lists at once with the unregister command (send unregister YourEmailAddressHere to [EMAIL PROTECTED])
Re: [GENERAL] how to load a sql-file????
psql database_name -U postgres -f loadfile.sql Should do what you want. Or if you are already in psql take a look at the \i command. Jason --- markus jais [EMAIL PROTECTED] wrote: hi, maybe this is somewhere in the docs but I couldn't find it. I am a beginner to postgresql and do not know much till now. I have bought a book on SQL and now I want to import the sample databases into postgresql they are provided as *.sql. in MySQL I can type something like in Bash on my linux box: $ mysql -u root -p file.sql then the file file.sql is read. can you tell me how to do this with postgresql??? thanks a lot. markus -- Markus Jais http://www.mjais.de [EMAIL PROTECTED] The road goes ever on and on - Bilbo Baggins ---(end of broadcast)--- TIP 2: you can get off all lists at once with the unregister command (send "unregister YourEmailAddressHere" to [EMAIL PROTECTED]) __ Do You Yahoo!? Get email at your own domain with Yahoo! Mail. http://personal.mail.yahoo.com/?.refer=text ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster
Re: [GENERAL] Supertypes?
I believe that what you are looking for is inheritance. http://postgresql.readysetnet.com/devel-corner/docs/user/inherit.html I hope this is helpful, Jason Earl --- Christian Marschalek [EMAIL PROTECTED] wrote: In school we've learned about supertypes. I don't know if the raw translation is correct so here is an example: Supertype human with the attributes name,age,size. Now I can derrive types from it... For example - employe with even more attributes like personal id. Can I realise this in PostgreSQL? And if yes, would anybody please explain how, or point me to the right documentation? Thanks and regards, Christian Marschalek ---(end of broadcast)--- TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/users-lounge/docs/faq.html __ Do You Yahoo!? Get email at your own domain with Yahoo! Mail. http://personal.mail.yahoo.com/?.refer=text ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster