Re: [GENERAL] PostgreSQL vs. MySQL benchmarks on SMP FreeBSD 7.0

2008-03-05 Thread Greg Smith
On Wed, 5 Mar 2008, [EMAIL PROTECTED] wrote: b) PostgreSQL is in general 35%-45% faster. And this is using sysbench, which is an old MySQL benchmark with rudimentary PostgreSQL support bolted on. Last time I checked it didn't even put statements into transaction blocks correctly under Postg

[GENERAL] PostgreSQL vs. MySQL benchmarks on SMP FreeBSD 7.0

2008-03-05 Thread [EMAIL PROTECTED]
Apologizes if this has already been announced - http://www.scribd.com/doc/551889/Introducing-Freebsd-70 a presentation of the SMP in FreeBSD 7.0 using PostgreSQL and MySQL to produce benchmarks. Notable quotes - a) MySQL degrades after utilizing all CPUs, while PostgreSQL does not (the explana

Re: [GENERAL] postgresql vs mysql

2007-03-06 Thread Richard Huxton
Andreas 'ads' Scherbaum wrote: Hello, On Thu, 22 Feb 2007 00:16:24 +0800 Lincoln Yeoh wrote: Want transactions? Use innoDB. Want to restore a multi-gigabyte database fast from backups, sure use MyISAM (too many people seem to have probs doing that with innoDB). sure you want to do this? h

Re: Wikipedia on Postgres (was Re: [GENERAL] postgresql vs mysql)

2007-03-06 Thread brian
While no one in thier right mind should be using wikipgedia, I'm sympathetic to those who might still be stuck on it for some reason, so if you guys can produce a patch against the wikipgedia cvs, I'd be happy to apply it. I'd like to patch that name. ---(end of broad

Re: Wikipedia on Postgres (was Re: [GENERAL] postgresql vs mysql)

2007-03-05 Thread Robert Treat
On Friday 23 February 2007 16:43, Chad Wagner wrote: > On 2/23/07, Bill Moran <[EMAIL PROTECTED]> wrote: > > > In any case if anyone is interested I was able to reproduce the changes > > > > that > > > > > wikipgedia made and applied those changes (as well as others) all the > > > > way up > > > >

Re: [GENERAL] postgresql vs mysql

2007-03-04 Thread Andreas 'ads' Scherbaum
On Fri, 23 Feb 2007 13:49:06 +1300 "Andrej Ricnik-Bay" <[EMAIL PROTECTED]> wrote: > On 2/23/07, Jim Nasby <[EMAIL PROTECTED]> wrote: > > That depends greatly on what you're doing with it. Generally, as soon > > as you start throwing a multi-user workload at it, MySQL stops > > scaling. http://twea

Re: [GENERAL] postgresql vs mysql

2007-03-04 Thread Andreas 'ads' Scherbaum
Hello all, On Wed, 21 Feb 2007 10:02:04 -0600 Scott Marlowe <[EMAIL PROTECTED]> wrote: > It swallows column level foreign key contraints and does nothing with > them, no errors nothing, even if you're defining innodb tables. I.e. > this produces not errors: > > mysql> create table a (id int pr

Re: [GENERAL] postgresql vs mysql

2007-03-04 Thread Andreas 'ads' Scherbaum
Hello, On Thu, 22 Feb 2007 00:16:24 +0800 Lincoln Yeoh wrote: > Want transactions? Use innoDB. Want to restore a multi-gigabyte > database fast from backups, sure use MyISAM (too many people seem to > have probs doing that with innoDB). sure you want to do this? http://bugs.mysql.com/bug.ph

Re: [GENERAL] postgresql vs mysql

2007-03-04 Thread Andreas 'ads' Scherbaum
On Thu, 22 Feb 2007 17:14:11 -0600 Jim Nasby <[EMAIL PROTECTED]> wrote: > On Feb 20, 2007, at 11:59 PM, Adam Rich wrote: > > "As of 5.0.2, the server requires that month and day values > > be legal, and not merely in the range 1 to 12 and 1 to 31, > > respectively." > > Yes, but any session is fr

Re: Wikipedia on Postgres (was Re: [GENERAL] postgresql vs mysql)

2007-02-25 Thread Chad Wagner
On 2/25/07, Magnus Hagander <[EMAIL PROTECTED]> wrote: > For the record, anyone using wikipgedia deserves the pain they > get: it is deprecated. The latest version of MediaWiki itself is what > should now be used: it will detect if you have Postgres upon > installation. :) Perhaps the project s

Re: Wikipedia on Postgres (was Re: [GENERAL] postgresql vs mysql)

2007-02-25 Thread Chad Wagner
On 2/25/07, Greg Sabino Mullane <[EMAIL PROTECTED]> wrote: For the record, anyone using wikipgedia deserves the pain they get: it is deprecated. The latest version of MediaWiki itself is what should now be used: it will detect if you have Postgres upon installation. :) Some of us are still us

Re: Wikipedia on Postgres (was Re: [GENERAL] postgresql vs mysql)

2007-02-25 Thread Magnus Hagander
> For the record, anyone using wikipgedia deserves the pain they > get: it is deprecated. The latest version of MediaWiki itself is what > should now be used: it will detect if you have Postgres upon > installation. :) Perhaps the project should be *gasp* deleted then? ;-) Or is there actual histo

Re: Wikipedia on Postgres (was Re: [GENERAL] postgresql vs mysql)

2007-02-25 Thread Greg Sabino Mullane
-BEGIN PGP SIGNED MESSAGE- Hash: RIPEMD160 > How is the Postgres port of the Wikipedia doing this days anyway? > Is it in a shape where one would consider it "competitive"? The port of MediaWiki is going well: it is certainly usable, and is already being used by a number of sites. I w

Re: [GENERAL] postgresql vs mysql

2007-02-23 Thread CaT
On Thu, Feb 22, 2007 at 01:08:04PM +1100, Chris wrote: > In postgres, to stop an empty blank string: > > create table a(a text not null check (char_length(a) > 0)); What's wrrong with using a <> '' sd the check? Or is this just a flavour thing? -- "To the extent that we overreact, we prof

Re: [GENERAL] postgresql vs mysql

2007-02-23 Thread Richard Broersma Jr
> That's why you make a table for every device or every measurement, and > then use a view to consolidate it. With update-able views, there's no > excuse not to. I would be interested on here some of your experiences on this? I've built and made use of table hierarchies three levels deep and abo

Re: [GENERAL] postgresql vs mysql

2007-02-23 Thread Martijn van Oosterhout
On Fri, Feb 23, 2007 at 02:50:48PM -0800, Glen Parker wrote: > I can and do solve the problem by simply not using NULL in character > fields, and by the rather gratuitous use of coalesce() in queries. I'm confused. If you don't use NULLs then you don't need coalesce either. > The > problem is

Re: [GENERAL] postgresql vs mysql

2007-02-23 Thread Peter Eisentraut
Ron Johnson wrote: > Each of the daily/hourly/etc temperature readings are independent. > Therefore they should each have their own row in the "meteorology > readings" table. I *think* that breaks 3NF. If everything is, as you say, independent, then there can be no 3NF violation, because that on

Re: [GENERAL] postgresql vs mysql

2007-02-23 Thread Glen Parker
Ben wrote: What I read was that you have no use for NULLs, and that they're equivilant to zero or an empty string or some other known value. Sorry if I misunderstood that. Equivalent, yes, because NULL doesn't usually mean UNKNOWN in this system, just NOT ENTERED. I do still have use for NUL

Re: [GENERAL] postgresql vs mysql

2007-02-23 Thread Ron Johnson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 02/23/07 15:47, Peter Eisentraut wrote: > Brandon Aiken wrote: >> That's why you make a table for every device or every measurement, >> and then use a view to consolidate it. With updatable views, there's >> no excuse not to. > > No, you put them

Re: [GENERAL] postgresql vs mysql

2007-02-23 Thread Glen Parker
It cannot already do what I want, unless you blatantly ignore what I wrote. Putting coalesce() calls *everywhere* counts as more work, don't you agree? -Glen Ben wrote: But, why do you need an extension when the existing system can already do what you want? ---(en

Re: [GENERAL] postgresql vs mysql

2007-02-23 Thread Peter Eisentraut
Brandon Aiken wrote: > That's why you make a table for every device or every measurement, > and then use a view to consolidate it. With updatable views, there's > no excuse not to. No, you put them all on one table and put nulls in places where no data is available. With real database systems,

Re: Wikipedia on Postgres (was Re: [GENERAL] postgresql vs mysql)

2007-02-23 Thread Chad Wagner
On 2/23/07, Bill Moran <[EMAIL PROTECTED]> wrote: > In any case if anyone is interested I was able to reproduce the changes that > wikipgedia made and applied those changes (as well as others) all the way up > to the 1.6.10 codebase. The only reason I mention this is because 1.6is > the only ch

Re: [GENERAL] postgresql vs mysql

2007-02-23 Thread Tino Wildenhain
Glen Parker schrieb: Ben wrote: I'm sorry maybe I missed something, but if you don't need NULLs and feel they just add extra work, why don't you just declare all your columns to be not null and have them default to zero or an empty string? Because I DO need NULLS for non text fields, and I st

Re: [GENERAL] postgresql vs mysql

2007-02-23 Thread Glen Parker
That's absolutely correct. What I want is a totally non standard *optional* extension, recognizing that many, even if not most, applications could benefit from it. I think there's a clean way to do it. I would never ask for such a thing if I thought it would effect an out of the box installa

Re: [GENERAL] postgresql vs mysql

2007-02-23 Thread Glen Parker
Ben wrote: I'm sorry maybe I missed something, but if you don't need NULLs and feel they just add extra work, why don't you just declare all your columns to be not null and have them default to zero or an empty string? Because I DO need NULLS for non text fields, and I still want NULL to comp

Re: [GENERAL] postgresql vs mysql

2007-02-23 Thread Tino Wildenhain
Steve Crawford schrieb: Mark Walker wrote: I'm not sure what you're trying to do but, it appears that you database design is incorrect. What you need is something like CREATE TABLE temp_readings ( _date Date, temperature double, source varchar(20), ) No reading, no record. Are you suggest

Re: [GENERAL] postgresql vs mysql

2007-02-23 Thread Susemail
On Thursday 22 February 2007 05:10, Rich Shepard wrote: > On Thu, 22 Feb 2007, Tim Tassonis wrote: > > I do still think it is a bit of an oddity, the concept of the null > > column. From my experience, it creates more problems than it actually > > solves and generally forces you to code more rather

Re: [GENERAL] postgresql vs mysql

2007-02-23 Thread Steve Crawford
Glen Parker wrote: > Buy the same token, some application have no use whatsoever for the > distinction between NULL and ''. In that case, the distinction just > adds work. True, I suppose. But if I need that, I can live with a one-time "...not null default ''..." addition to my table definition.

Re: [GENERAL] postgresql vs mysql

2007-02-23 Thread Brandon Aiken
f Of Steve Crawford Sent: Friday, February 23, 2007 1:04 PM To: Mark Walker Cc: pgsql-general@postgresql.org Subject: Re: [GENERAL] postgresql vs mysql Mark Walker wrote: > I'm not sure what you're trying to do but, it appears that you database > design is incorrect. What you need is

Re: [GENERAL] postgresql vs mysql

2007-02-23 Thread Steve Crawford
Mark Walker wrote: > I'm not sure what you're trying to do but, it appears that you database > design is incorrect. What you need is something like > > CREATE TABLE temp_readings > ( > _date Date, > temperature double, > source varchar(20), > ) > > No reading, no record. Are you suggesting t

Re: [GENERAL] postgresql vs mysql

2007-02-23 Thread Jim C. Nasby
On Fri, Feb 23, 2007 at 01:49:06PM +1300, Andrej Ricnik-Bay wrote: > On 2/23/07, Jim Nasby <[EMAIL PROTECTED]> wrote: > >That depends greatly on what you're doing with it. Generally, as soon > >as you start throwing a multi-user workload at it, MySQL stops > >scaling. http://tweakers.net recently d

Re: [GENERAL] postgresql vs mysql

2007-02-23 Thread Scott Ribe
> In that case, the distinction just > adds work. In that case you declare the column not null and don't use nulls. -- Scott Ribe [EMAIL PROTECTED] http://www.killerbytes.com/ (303) 722-0567 voice ---(end of broadcast)--- TIP 1: if posting/readi

Re: [GENERAL] postgresql vs mysql

2007-02-23 Thread Tommy Gildseth
Ben wrote: I'm sorry maybe I missed something, but if you don't need NULLs and feel they just add extra work, why don't you just declare all your columns to be not null and have them default to zero or an empty string? which is what mySQL does by default :-) The statement CREATE TABLE foo

Re: Wikipedia on Postgres (was Re: [GENERAL] postgresql vs mysql)

2007-02-23 Thread cedric
Le vendredi 23 février 2007 16:37, Ian Harding a écrit : > On 2/22/07, Alvaro Herrera <[EMAIL PROTECTED]> wrote: > > Joshua D. Drake escribió: > > > Andrej Ricnik-Bay wrote: > > > > On 2/23/07, Jim Nasby <[EMAIL PROTECTED]> wrote: > > > >> That depends greatly on what you're doing with it. Generall

Re: Wikipedia on Postgres (was Re: [GENERAL] postgresql vs mysql)

2007-02-23 Thread Ian Harding
On 2/22/07, Alvaro Herrera <[EMAIL PROTECTED]> wrote: Joshua D. Drake escribió: > Andrej Ricnik-Bay wrote: > > On 2/23/07, Jim Nasby <[EMAIL PROTECTED]> wrote: > >> That depends greatly on what you're doing with it. Generally, as soon > >> as you start throwing a multi-user workload at it, MySQL

Re: Wikipedia on Postgres (was Re: [GENERAL] postgresql vs mysql)

2007-02-23 Thread Bill Moran
In response to "Chad Wagner" <[EMAIL PROTECTED]>: > On 2/23/07, Bill Moran <[EMAIL PROTECTED]> wrote: > > > > I installed wikipgdia for the WPLUG wiki: > > http://wplug.ece.cmu.edu/wiki/ > > Isn't that the same wikipgedia that is found at pgFoundry? Yes. > The only issue I > really had the the

Re: Wikipedia on Postgres (was Re: [GENERAL] postgresql vs mysql)

2007-02-23 Thread Chad Wagner
On 2/23/07, Bill Moran <[EMAIL PROTECTED]> wrote: I installed wikipgdia for the WPLUG wiki: http://wplug.ece.cmu.edu/wiki/ Isn't that the same wikipgedia that is found at pgFoundry? The only issue I really had the the wikipgedia port is that the codebase is 1.6alpha, and it seemed like it wa

Re: [GENERAL] postgresql vs mysql

2007-02-22 Thread Joshua D. Drake
John Smith wrote: > sounds like you aren't happy with one of the products your company > offers at > http://www.commandprompt.com/community/plphp/ - "plphp stands for > procedural > language php. the language has the php engine at its core and provides php > scripting support for procedures and fun

Re: Wikipedia on Postgres (was Re: [GENERAL] postgresql vs mysql)

2007-02-22 Thread Bill Moran
Alvaro Herrera <[EMAIL PROTECTED]> wrote: > > Joshua D. Drake escribió: > > Andrej Ricnik-Bay wrote: > > > On 2/23/07, Jim Nasby <[EMAIL PROTECTED]> wrote: > > >> That depends greatly on what you're doing with it. Generally, as soon > > >> as you start throwing a multi-user workload at it, MySQL st

Re: [GENERAL] postgresql vs mysql

2007-02-22 Thread John Smith
sounds like you aren't happy with one of the products your company offers at http://www.commandprompt.com/community/plphp/ - "plphp stands for procedural language php. the language has the php engine at its core and provides php scripting support for procedures and functions in postgresql. written

Re: [GENERAL] postgresql vs mysql

2007-02-22 Thread Joshua D. Drake
Ben wrote: > I'm sorry maybe I missed something, but if you don't need NULLs and feel > they just add extra work, why don't you just declare all your columns to > be not null and have them default to zero or an empty string? Stop making sense! Joshua D. Drake > > On Feb 22, 2007, at 5:11 PM, Gl

Re: [GENERAL] postgresql vs mysql

2007-02-22 Thread Ben
I'm sorry maybe I missed something, but if you don't need NULLs and feel they just add extra work, why don't you just declare all your columns to be not null and have them default to zero or an empty string? On Feb 22, 2007, at 5:11 PM, Glen Parker wrote: Buy the same token, some application

Re: [GENERAL] postgresql vs mysql

2007-02-22 Thread Andrej Ricnik-Bay
On 2/23/07, Joshua D. Drake <[EMAIL PROTECTED]> wrote: Andrej Ricnik-Bay wrote: > On 2/23/07, Jim Nasby <[EMAIL PROTECTED]> wrote: >> That depends greatly on what you're doing with it. Generally, as soon >> as you start throwing a multi-user workload at it, MySQL stops >> scaling. http://tweakers

Re: Wikipedia on Postgres (was Re: [GENERAL] postgresql vs mysql)

2007-02-22 Thread Joshua D. Drake
Alvaro Herrera wrote: > Joshua D. Drake escribió: >> Alvaro Herrera wrote: >>> Joshua D. Drake escribió: Andrej Ricnik-Bay wrote: > On 2/23/07, Jim Nasby <[EMAIL PROTECTED]> wrote: >> That depends greatly on what you're doing with it. Generally, as soon >> as you start throwing a m

Re: Wikipedia on Postgres (was Re: [GENERAL] postgresql vs mysql)

2007-02-22 Thread Alvaro Herrera
Joshua D. Drake escribió: > Alvaro Herrera wrote: > > Joshua D. Drake escribió: > >> Andrej Ricnik-Bay wrote: > >>> On 2/23/07, Jim Nasby <[EMAIL PROTECTED]> wrote: > That depends greatly on what you're doing with it. Generally, as soon > as you start throwing a multi-user workload at it,

Re: [GENERAL] postgresql vs mysql

2007-02-22 Thread Ron Johnson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 02/22/07 19:04, Mark Walker wrote: > I'm not sure what you're trying to do but, it appears that you database > design is incorrect. What you need is something like > > CREATE TABLE temp_readings > ( > _date Date, > temperature double, > source

Re: Wikipedia on Postgres (was Re: [GENERAL] postgresql vs mysql)

2007-02-22 Thread Joshua D. Drake
Alvaro Herrera wrote: > Joshua D. Drake escribió: >> Andrej Ricnik-Bay wrote: >>> On 2/23/07, Jim Nasby <[EMAIL PROTECTED]> wrote: That depends greatly on what you're doing with it. Generally, as soon as you start throwing a multi-user workload at it, MySQL stops scaling. http://twea

Re: [GENERAL] postgresql vs mysql

2007-02-22 Thread Glen Parker
Buy the same token, some application have no use whatsoever for the distinction between NULL and ''. In that case, the distinction just adds work. I would love to see different ways to handle NULL implemented by the server. For what I do, NULL could always compare equal to zero and ''. I h

Wikipedia on Postgres (was Re: [GENERAL] postgresql vs mysql)

2007-02-22 Thread Alvaro Herrera
Joshua D. Drake escribió: > Andrej Ricnik-Bay wrote: > > On 2/23/07, Jim Nasby <[EMAIL PROTECTED]> wrote: > >> That depends greatly on what you're doing with it. Generally, as soon > >> as you start throwing a multi-user workload at it, MySQL stops > >> scaling. http://tweakers.net recently did a s

Re: [GENERAL] postgresql vs mysql

2007-02-22 Thread Mark Walker
I'm not sure what you're trying to do but, it appears that you database design is incorrect. What you need is something like CREATE TABLE temp_readings ( _date Date, temperature double, source varchar(20), ) No reading, no record. Are you suggesting that you would have a weekly set of rec

Re: [GENERAL] postgresql vs mysql

2007-02-22 Thread Joshua D. Drake
Andrej Ricnik-Bay wrote: > On 2/23/07, Jim Nasby <[EMAIL PROTECTED]> wrote: >> That depends greatly on what you're doing with it. Generally, as soon >> as you start throwing a multi-user workload at it, MySQL stops >> scaling. http://tweakers.net recently did a study on that. > I think I recall tha

Re: [GENERAL] postgresql vs mysql

2007-02-22 Thread Steve Crawford
Tim Tassonis wrote: > Chris wrote: >> Erick Papadakis wrote: >>> So how should I make a database rule in MySQL to not allow blank >>> strings. Basically to REQUIRE a value for that column, whether it is >>> NULL or NADA or VOID or whatever you wish to call it. I just want to >>> make sure that some

Re: [GENERAL] postgresql vs mysql

2007-02-22 Thread Andrej Ricnik-Bay
On 2/23/07, Jim Nasby <[EMAIL PROTECTED]> wrote: That depends greatly on what you're doing with it. Generally, as soon as you start throwing a multi-user workload at it, MySQL stops scaling. http://tweakers.net recently did a study on that. I think I recall that wikipedia uses MySQL ... they get

Re: [GENERAL] postgresql vs mysql

2007-02-22 Thread Steve Crawford
Ron Johnson wrote: > On 02/21/07 18:09, Erick Papadakis wrote: >> How would you like to use a database that has nuances like these -- >> http://forums.mysql.com/read.php?20,141120,141120#msg-141120 > > Huh? > > A blank string (does that mean '' or ' '?) is not NULL, so of > *course* it should pas

Re: [GENERAL] postgresql vs mysql

2007-02-22 Thread Scott Marlowe
On Thu, 2007-02-22 at 18:48 -0500, Brandon Aiken wrote: > Digg and Slashdot use MySQL databases, so clearly they *can* be made to > support a high-load, high-performance, limited-write style web > application. > > You might remember a few months back when SlashDot had to turn off > threaded repl

Re: [GENERAL] postgresql vs mysql

2007-02-22 Thread Brandon Aiken
ineer -Original Message- From: Jim Nasby [mailto:[EMAIL PROTECTED] Sent: Thursday, February 22, 2007 6:28 PM To: Brandon Aiken Cc: pgsql-general@postgresql.org Subject: Re: [GENERAL] postgresql vs mysql On Feb 21, 2007, at 2:23 PM, Brandon Aiken wrote: > IMX, the only things going for M

Re: [GENERAL] postgresql vs mysql

2007-02-22 Thread Ron Johnson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 02/22/07 17:17, Jim Nasby wrote: > On Feb 21, 2007, at 10:26 AM, Scott Marlowe wrote: >> The only thing I can think of that rewrites a whole postgresql table >> would be reindexing it, or an update without a where clause (or a where >> clause that i

Re: [GENERAL] postgresql vs mysql

2007-02-22 Thread Jim Nasby
On Feb 21, 2007, at 2:23 PM, Brandon Aiken wrote: IMX, the only things going for MySQL are: 1. It's fast. That depends greatly on what you're doing with it. Generally, as soon as you start throwing a multi-user workload at it, MySQL stops scaling. http://tweakers.net recently did a study on

Re: [GENERAL] postgresql vs mysql

2007-02-22 Thread Jim Nasby
On Feb 21, 2007, at 10:26 AM, Scott Marlowe wrote: The only thing I can think of that rewrites a whole postgresql table would be reindexing it, or an update without a where clause (or a where clause that includes every row). Normal operations, like create index, add column, drop column, etc

Re: [GENERAL] postgresql vs mysql

2007-02-22 Thread Jim Nasby
On Feb 20, 2007, at 11:59 PM, Adam Rich wrote: "As of 5.0.2, the server requires that month and day values be legal, and not merely in the range 1 to 12 and 1 to 31, respectively." Yes, but any session is free to change that setting and insert whatever garbage they want. AFAIK there's absolut

Re: Checking for string data that makes sense Re: [GENERAL] postgresql vs mysql

2007-02-22 Thread Shashank Tripathi
I would do a CHECK (trim(a) <> '') TRIM() would add some processing time, so I'd include it only if there was a chance of spaces getting added. From a puritanical point of view, it is definitely a good idea. To the original poster, this syntax should work in MySQL as well: create table myt

Re: Checking for string data that makes sense Re: [GENERAL] postgresql vs mysql

2007-02-22 Thread Shashank Tripathi
On 22/02/07, Shashank Tripathi <[EMAIL PROTECTED]> wrote: > I would do a CHECK (trim(a) <> '') TRIM() would add some processing time, so I'd include it only if there was a chance of spaces getting added. From a puritanical point of view, it is definitely a good idea. To the original poster, t

Re: [GENERAL] postgresql vs mysql

2007-02-22 Thread Mark Walker
If you don't know something, why are you trying to record it? From a strict relational sense, the existence of NULL values in your fields indicates that your primary keys are not truly candidate keys for all your fields. That means your database isn't [BCNF] normalized.<<< I agree that ther

Re: [GENERAL] postgresql vs mysql

2007-02-22 Thread Brandon Aiken
s Sent: Thursday, February 22, 2007 10:31 AM To: Rich Shepard Cc: pgsql-general@postgresql.org Subject: Re: [GENERAL] postgresql vs mysql Rich Shepard wrote: > On Thu, 22 Feb 2007, Tim Tassonis wrote: > >> I do still think it is a bit of an oddity, the concept of the null >> co

Re: [GENERAL] postgresql vs mysql

2007-02-22 Thread Chad Wagner
On 2/22/07, Martijn van Oosterhout wrote: On Thu, Feb 22, 2007 at 12:05:20PM +1100, Chris wrote: > >SELECT foo, bar, COUNT(*) > >FROM baz > >GROUP BY foo > That one actually comes in handy ;) Especially in older versions (4.0) > that don't support subselects.. I must say I don't see any reaso

Re: [GENERAL] postgresql vs mysql (OT: perl)

2007-02-22 Thread Kevin Murphy
Randal L. Schwartz wrote: Russ> Take perl for example. I have still yet to see readable Perl code. You can't read it if you're not familiar with it. Seconded. Perl is like the churkendoose -- hybrid strength, ugly as hell, only poultry known that can scare off a fox every time, whole barnyar

Re: [GENERAL] postgresql vs mysql

2007-02-22 Thread Lincoln Yeoh
At 10:22 PM 2/22/2007, Tim Tassonis wrote: Chris wrote: An empty string is a KNOWN value. You know exactly what that value is - it's an empty string. A NULL is UNKNOWN - it doesn't have a value at all. I do still think it is a bit of an oddity, the concept of the null column. From my experie

Re: [GENERAL] postgresql vs mysql

2007-02-22 Thread Lincoln Yeoh
At 01:11 PM 2/22/2007, John Smith wrote: On 2/21/07, Lincoln Yeoh wrote: MySQL: the PHP of databases. 'd appreciate if you stick to the subject. jzs OK sorry... That was more of a footnote. Link. ---(end of broadcast)--- TIP 6: explain a

Re: [GENERAL] postgresql vs mysql

2007-02-22 Thread Randal L. Schwartz
> "Russ" == Russ Brown <[EMAIL PROTECTED]> writes: Russ> Take perl for example. I have still yet to see readable Perl code. I could say the same for greek, and pl/pgsql. You can't read it if you're not familiar with it. Please stop bashing Perl until you've read at least Learning Perl or th

Re: [GENERAL] postgresql vs mysql

2007-02-22 Thread Tim Tassonis
Rich Shepard wrote: On Thu, 22 Feb 2007, Tim Tassonis wrote: I do still think it is a bit of an oddity, the concept of the null column. From my experience, it creates more problems than it actually solves and generally forces you to code more rather than less in order to achieve your goals.

Re: [GENERAL] postgresql vs mysql

2007-02-22 Thread Rich Shepard
On Thu, 22 Feb 2007, Tim Tassonis wrote: I do still think it is a bit of an oddity, the concept of the null column. From my experience, it creates more problems than it actually solves and generally forces you to code more rather than less in order to achieve your goals. Tim, Long ago, a lo

Re: [GENERAL] postgresql vs mysql

2007-02-22 Thread Clodoaldo
2007/2/22, Russ Brown <[EMAIL PROTECTED]>: Ron Johnson wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > My definition is, "toy used/trumpeted by pseudo-professionals as a > professional tool, when it just doesn't measure up". > /me Tries really hard to resist responding /me Fails I

Re: [GENERAL] postgresql vs mysql

2007-02-22 Thread Martijn van Oosterhout
On Thu, Feb 22, 2007 at 12:05:20PM +1100, Chris wrote: > >SELECT foo, bar, COUNT(*) > >FROM baz > >GROUP BY foo > That one actually comes in handy ;) Especially in older versions (4.0) > that don't support subselects.. I must say I don't see any reasonable way of interpreting the above query. Is

Re: Checking for string data that makes sense Re: [GENERAL] postgresql vs mysql

2007-02-22 Thread brian
Zoltan Boszormenyi wrote: I would do a CHECK (trim(a) <> '') If you were ok with a string consisting soley of whitespace. I meant NOT NULL CHECK(trim(a) <> ''), keeping the context of the above example. Right. I plead that it was late when i replied. I honestly don't know what i was thi

Re: [GENERAL] postgresql vs mysql

2007-02-22 Thread Tim Tassonis
Chris wrote: Erick Papadakis wrote: So how should I make a database rule in MySQL to not allow blank strings. Basically to REQUIRE a value for that column, whether it is NULL or NADA or VOID or whatever you wish to call it. I just want to make sure that something, some value, is entered for a co

Re: [GENERAL] postgresql vs mysql

2007-02-22 Thread Tim Tassonis
Ron Johnson wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 My definition is, "toy used/trumpeted by pseudo-professionals as a professional tool, when it just doesn't measure up". Boah, here surely speaks a true professional playing in the league of Donald Knuth or even Alan Kay, as oppo

Re: [GENERAL] postgresql vs mysql

2007-02-22 Thread Russ Brown
Ron Johnson wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 My definition is, "toy used/trumpeted by pseudo-professionals as a professional tool, when it just doesn't measure up". /me Tries really hard to resist responding /me Fails I'm sorry, but having just been described as a 'pseud

Re: Checking for string data that makes sense Re: [GENERAL] postgresql vs mysql

2007-02-22 Thread CaT
On Thu, Feb 22, 2007 at 11:27:18AM +0100, Zoltan Boszormenyi wrote: > >>I would do a CHECK (trim(a) <> '') > > > >Whitespaces are values too, you know. > > Yes, I know. But e.g. for a real people name, would you store > accidentally entered spaces before or after the actual name, too? > Which woul

Re: Checking for string data that makes sense Re: [GENERAL] postgresql vs mysql

2007-02-22 Thread Zoltan Boszormenyi
CaT írta: On Thu, Feb 22, 2007 at 09:13:13AM +0100, Zoltan Boszormenyi wrote: Chris ?rta: CaT wrote: On Thu, Feb 22, 2007 at 01:08:04PM +1100, Chris wrote: create table a(a text not null check (char_length(a) > 0)); What's wrrong with using a <> ''

Re: [GENERAL] postgresql vs mysql

2007-02-22 Thread Ron Johnson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 My definition is, "toy used/trumpeted by pseudo-professionals as a professional tool, when it just doesn't measure up". On 02/22/07 02:08, Tyarli wrote: > he he. what does "the PHP of databases" mean? > > Joshua D. Drake wrote: >> John Smith wrote: >

Re: Checking for string data that makes sense Re: [GENERAL] postgresql vs mysql

2007-02-22 Thread CaT
On Thu, Feb 22, 2007 at 09:13:13AM +0100, Zoltan Boszormenyi wrote: > Chris ?rta: > >CaT wrote: > >>On Thu, Feb 22, 2007 at 01:08:04PM +1100, Chris wrote: > >>>create table a(a text not null check (char_length(a) > 0)); > >> > >>What's wrrong with using > >> > >>a <> '' > > > >Nothing, I just thoug

Re: Checking for string data that makes sense Re: [GENERAL] postgresql vs mysql

2007-02-22 Thread brian
Zoltan Boszormenyi wrote: Chris írta: CaT wrote: On Thu, Feb 22, 2007 at 01:08:04PM +1100, Chris wrote: In postgres, to stop an empty blank string: create table a(a text not null check (char_length(a) > 0)); What's wrrong with using a <> '' sd the check? Or is this just a flavour thin

Checking for string data that makes sense Re: [GENERAL] postgresql vs mysql

2007-02-22 Thread Zoltan Boszormenyi
Chris írta: CaT wrote: On Thu, Feb 22, 2007 at 01:08:04PM +1100, Chris wrote: In postgres, to stop an empty blank string: create table a(a text not null check (char_length(a) > 0)); What's wrrong with using a <> '' sd the check? Or is this just a flavour thing? Nothing, I just thought of

Re: [GENERAL] postgresql vs mysql

2007-02-22 Thread Tyarli
he he. what does "the PHP of databases" mean? Joshua D. Drake wrote: > John Smith wrote: > >> On 2/21/07, Lincoln Yeoh wrote: >> >>> MySQL: the PHP of databases. >>> >> 'd appreciate if you stick to the subject. >> > > Oops he probably should not have used MySQL because it is

Re: [GENERAL] postgresql vs mysql

2007-02-21 Thread Joshua D. Drake
John Smith wrote: > On 2/21/07, Lincoln Yeoh wrote: >> MySQL: the PHP of databases. > > 'd appreciate if you stick to the subject. Oops he probably should not have used MySQL because it is trademarked... mysql: The PHP of databases ;) Sincerely, Joshua D. Drake > jzs > > -

Re: [GENERAL] postgresql vs mysql

2007-02-21 Thread brian
Chris wrote: It's not an oddity. An empty string is a KNOWN value. You know exactly what that value is - it's an empty string. A NULL is UNKNOWN - it doesn't have a value at all. Just to expand on that (and to drag this thread out a little longer), i find that a pretty good way to get ac

Re: [GENERAL] postgresql vs mysql

2007-02-21 Thread John Smith
On 2/21/07, Lincoln Yeoh wrote: MySQL: the PHP of databases. 'd appreciate if you stick to the subject. jzs ---(end of broadcast)--- TIP 1: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PR

Re: [GENERAL] postgresql vs mysql

2007-02-21 Thread Chris
CaT wrote: On Thu, Feb 22, 2007 at 01:08:04PM +1100, Chris wrote: In postgres, to stop an empty blank string: create table a(a text not null check (char_length(a) > 0)); What's wrrong with using a <> '' sd the check? Or is this just a flavour thing? Nothing, I just thought of the other wa

Re: [GENERAL] postgresql vs mysql

2007-02-21 Thread Richard Broersma Jr
> Does PostgreSQL suffer from this oddity as well? This distinction > between an empty string and a NULL? Could you also please give me an > example of where this would be useful from a business logic > standpoint? Why should a NULL be different from an empty string, > what's the big mysterious dif

Re: [GENERAL] postgresql vs mysql

2007-02-21 Thread Chris
Erick Papadakis wrote: So how should I make a database rule in MySQL to not allow blank strings. Basically to REQUIRE a value for that column, whether it is NULL or NADA or VOID or whatever you wish to call it. I just want to make sure that something, some value, is entered for a column. Would ap

Re: [GENERAL] postgresql vs mysql

2007-02-21 Thread Rich Shepard
On Thu, 22 Feb 2007, Erick Papadakis wrote: Why should a NULL be different from an empty string, what's the big mysterious difference? Long ago and far away, when I was in the Army, we had quite a few soldiers whose name took the form 'John NMI Doe.' That's because the Army -- even before co

Re: [GENERAL] postgresql vs mysql

2007-02-21 Thread Rodrigo Gonzalez
Erick Papadakis wrote: So how should I make a database rule in MySQL to not allow blank strings. Basically to REQUIRE a value for that column, whether it is NULL or NADA or VOID or whatever you wish to call it. I just want to make sure that something, some value, is entered for a column. Would ap

Re: [GENERAL] postgresql vs mysql

2007-02-21 Thread Erick Papadakis
So how should I make a database rule in MySQL to not allow blank strings. Basically to REQUIRE a value for that column, whether it is NULL or NADA or VOID or whatever you wish to call it. I just want to make sure that something, some value, is entered for a column. Would appreciate any thoughts or

Re: [GENERAL] postgresql vs mysql

2007-02-21 Thread Michael Fuhr
On Wed, Feb 21, 2007 at 01:45:08PM -0600, Ron Johnson wrote: > On 02/21/07 08:42, Michael Fuhr wrote: > > Not as good as "ERROR: hey bonehead, there ain't no such date" but > > But it *inserts the "data"*! I didn't say otherwise and I'm not defending MySQL's behavior. I was simply refuting t

Re: [GENERAL] postgresql vs mysql

2007-02-21 Thread Chris
Erick Papadakis wrote: How would you like to use a database that has nuances like these -- http://forums.mysql.com/read.php?20,141120,141120#msg-141120 Err - an empty string is not the same as null, so that is perfectly valid. Null means unknown, an empty string is not unknown - it's a known v

Re: [GENERAL] postgresql vs mysql

2007-02-21 Thread Brusser, Michael
>> How would you like to use a database that has nuances like these -- >> http://forums.mysql.com/read.php?20,141120,141120#msg-141120 --- > Huh? > A blank string (does that mean '' or ' '?) is not NULL, so of > *course* it should pass the NOT NULL constraint. > Or am I missing something? ---

Re: [GENERAL] postgresql vs mysql

2007-02-21 Thread Ron Johnson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 02/21/07 19:01, Brusser, Michael wrote: > >>> How would you like to use a database that has nuances like these -- >>> http://forums.mysql.com/read.php?20,141120,141120#msg-141120 > > --- > >> Huh? >> A blank string (does that mean '' or ' '?) i

Re: [GENERAL] postgresql vs mysql

2007-02-21 Thread Chris
Adam Rich wrote: It's got a query parser that's dumb as a brick. While we're on this topic... I have a question on these series of queries: -- Query A select count(*) from customers c where not exists ( select 1 from orders o where o.customer_id = c.customer_id ) -- Query B select count(*) f

Re: [GENERAL] postgresql vs mysql

2007-02-21 Thread Chris
Chad Wagner wrote: On 2/20/07, *gustavo halperin* <[EMAIL PROTECTED] > wrote: I have a friend that ask me why postgresql is better than mysql. I personally prefer posgresql, but she need to give in her work 3 or 4 strong reasons for that. I mean not to muc

Re: [GENERAL] postgresql vs mysql

2007-02-21 Thread Ron Johnson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 02/21/07 18:09, Erick Papadakis wrote: > How would you like to use a database that has nuances like these -- > http://forums.mysql.com/read.php?20,141120,141120#msg-141120 Huh? A blank string (does that mean '' or ' '?) is not NULL, so of *course*

  1   2   >