Re: [GENERAL] NoSQL -vs- SQL

2010-10-12 Thread Randal L. Schwartz
ay on write... you can say "come back when any 1 replica says it has it" or "come back only when all 3 replicas confirm write".) So, it's not so much that you get schemaless key/value store (although that's a frequent feature)... it's that these aren

Re: [GENERAL] Postgre RAISE NOTICE and PHP

2009-08-18 Thread Randal L. Schwartz
ttp://ex-parrot.com/~pdw/Mail-RFC822-Address.html And no, I'm not kidding. If your regex is smaller than that, you aren't validating email... you're validating something "kinda like email". For example, is a valid email address. (Go ahead, try it... it has an autorespond

Re: [GENERAL] Postgre RAISE NOTICE and PHP

2009-08-19 Thread Randal L. Schwartz
Thing here. This is what I'm arguing for. Anything less than that, and your code deserves to end up in thedailywtf.com as an example of what *not* to do. -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 http://www.stonehenge.com/merlyn/> Smalltalk/Perl/Unix consulting,

Re: [GENERAL] Postgre RAISE NOTICE and PHP

2009-08-19 Thread Randal L. Schwartz
. Just accept it ... Exactly! If you don't want to use the 950-character regex, DON'T DO ANYTHING AT ALL. Far simpler. -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 http://www.stonehenge.com/merlyn/> Smalltalk/Perl/Unix consulting, Technical writin

Re: [GENERAL] What's wrong with this regexp?

2009-10-10 Thread Randal L. Schwartz
row) Aha, and now we have the right string for the regex engine, so let's test that match: merlyn=# select '/steps/?step=10' ~ E'^/steps/\\?step=10$'; ?column? -- t (1 row) Bingo. True. -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. -

Re: [GENERAL] An amusing MySQL weakness--not!

2011-06-25 Thread Randal L. Schwartz
>>>>> "Michael" == Michael Nolan writes: Michael> Earlier today I was working on a MySQL database (not by choice, I assure Michael> you), Friends don't let friends use MySQL. -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 00

Re: [GENERAL] MySQL versus Postgres

2010-08-09 Thread Randal L. Schwartz
overemphasize the example mode at the cost of presenting concepts or structure. You need all three. -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 http://www.stonehenge.com/merlyn/> Smalltalk/Perl/Unix consulting, Technical writing, Comedy, etc. etc. See htt

Re: [GENERAL] Simple schema diff script in Perl

2010-09-16 Thread Randal L. Schwartz
>>>>> "hans" == hans writes: hans> Actually just compare tables and fields, for my current hans> requirements is ok, i plan to add the sequences, but no more. I believe SQLFairy (aka SQL::Translator) can canonicalize schemas, and even give DDL to turn one sch

Re: [GENERAL] Merge replication with Postgresql on Windows?

2010-09-28 Thread Randal L. Schwartz
this sort of disconnected syncing in mind. You can hear my interview with Jan Lehnardt at http://twit.tv/floss36. -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 http://www.stonehenge.com/merlyn/> Smalltalk/Perl/Unix consulting, Technical writing, Comedy, etc.

Re: [GENERAL] Clarification regarding array columns usage?

2009-12-25 Thread Randal L. Schwartz
ar column that holds a string that is concatenated m> by a trigger function. Something like this: Why? If you were storing these as a daughter table, then you get easy parsing, easy concurrent updating, easy access to aggregate functions. Just like SQL was meant to be used. Stop thinking of tables

Re: [GENERAL] Email address column verification foraddress list

2010-04-13 Thread Randal L. Schwartz
s code will end up on thedailywtf.com[1] when you leave and your successor discovers what you insanely tried to do. [1] which should be mandatory reading for *all* devs, with the goal of "never let my code end up here" -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. -

Re: [GENERAL] Emacs and postgres

2005-02-23 Thread Randal L. Schwartz
s of it, but I still like Sean> Emacs as an editor and wondered if anyone else has tricks/plugins for Sean> emacs users. sql-mode works fairly nice, and has a postgres submode. -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 http://www.stonehenge.com/mer

[GENERAL] getting the ranks of items

2005-05-03 Thread Randal L. Schwartz
e a column with the current ranks (yes, I know this latter version is more prone to error). I'm certain there's probably something I can do to laminate an array value to a query result. Am I confused? (Yes!) -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +

Re: [GENERAL] getting the ranks of items

2005-05-03 Thread Randal L. Schwartz
>>>>> "Matthew" == Matthew Terenzio <[EMAIL PROTECTED]> writes: Matthew> On May 3, 2005, at 8:30 PM, Randal L. Schwartz wrote: >> Is there a simple way with PostgreSQL to assign relative ranks to the >> result of a query ORDER BY? Matthew>

Re: [GENERAL] getting the ranks of items

2005-05-04 Thread Randal L. Schwartz
f not, I'm sure I could dig up a couple of books to learn it. :) -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 http://www.stonehenge.com/merlyn/> Perl/Unix/security consulting, Technical writing, Comedy, etc. etc. See PerlTraining.

Re: [GENERAL] To Postgres or not

2005-07-14 Thread Randal L. Schwartz
e. That's regardless of InnoDB or not. MySQL is a toy compared to PostgreSQL. -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 http://www.stonehenge.com/merlyn/> Perl/Unix/security consulting, Technical writing, Comedy, etc. etc. See PerlTraining.Stonehen

Re: [GENERAL] Poll on your LAPP Preferences

2005-08-09 Thread Randal L. Schwartz
o/~ you down with O-A-P-P? (yeah you know me!) get down with OAPP! (yeah you know me!) o/~ -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 http://www.stonehenge.com/merlyn/> Perl/Unix/security consulting, Technical writing, Comedy, etc. etc. See PerlTraining.

Re: [GENERAL] Email Verfication Regular Expression

2005-09-07 Thread Randal L. Schwartz
+[.]?){1,}[a-zA-Z0-9-]*+\.){1,}[a-zA-Z]{2,4}$ Markus> but i don't think, it's really complete. Absolutely not. It rejects which is a perfectly valid email address. (Try it, you'll get my autoresponder.) Google for "RFC 822" and "RFC 2822" to see the *

Re: [GENERAL] Email Verfication Regular Expression

2005-09-07 Thread Randal L. Schwartz
ally? Name one. Or maybe it's just your idea of syntax that's wrong. -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 http://www.stonehenge.com/merlyn/> Perl/Unix/security consulting, Technical writing, Comedy, etc. etc. See PerlTraining.S

Re: [GENERAL] Email Verfication Regular Expression

2005-09-07 Thread Randal L. Schwartz
ve to rename your hosts". Do you have an example of an underscore host that is publicly addressable? I'd like to look up their MX. :) -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 http://www.stonehenge.com/merlyn/> Perl/Unix/security consulting, Tech

Re: [GENERAL] Email Verfication Regular Expression

2005-09-08 Thread Randal L. Schwartz
implicit MX RR, with a preference of 0, pointing to that host. So, your function will say "no good" if the domain has an A record but no MX record, even though the RFC says that's OK and deliverable. Man, is there a lot of bogus knowledge and cargo culting around this subject! -- R

Re: [GENERAL] Perl regular expressions

2005-09-29 Thread Randal L. Schwartz
ot entirely compatible. :) Yes, it's a powerful regular expression engine, but Perl regexen can still do some common things that cannot be done with PCRE. -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 http://www.stonehenge.com/merlyn/> Perl/Unix/securi

Re: [GENERAL] Beyond the 1600 columns limit on windows

2005-11-08 Thread Randal L. Schwartz
ere's going to be trouble ahead, because that should have been a different data structure. Similarly, I bet some of your columns are "foo1" and "foo2". Signs of brokenness in the design. Or do you really have 1600 *different* attributes, none of which have a

Re: [GENERAL] Wikipedia help requested, especially non-English speakers

2005-11-12 Thread Randal L. Schwartz
ism. And, some Wikipedians uses un-logged-in edits as a high indicator that the work is vandalism, and get prepared to revert. It's odd... being logged in gives you *more* anonymity, not less. :) But the vandals don't understand that... yet. -- Randal L. Schwartz - Stone

Re: [GENERAL] More grist for the PostgreSQL vs MySQL mill

2007-01-20 Thread Randal L. Schwartz
between pointing out a legitimate John> flaw and simply bashing for bashing's sake. It's a valid discussion here (although better on -advocacy), because it helps me have the right facts to present to clients about whether they should stay with a legacy database in MySQL vs upgrading to

Re: [GENERAL] Postgresql 8.1: plperl code works with LATIN1, fail

2007-01-29 Thread Randal L. Schwartz
the case, then the embedded Perl interpreter should be started in that mode, perhaps by adding "-Mutf8" to the arg list of the embedded interpreter. -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 http://www.stonehenge.com/merlyn/> Per

Re: [GENERAL] postgresql vs mysql

2007-02-22 Thread Randal L. Schwartz
until you've read at least Learning Perl or the equivalent. Please. You have no right. It's pure prejudice, and usually just parroted from others. -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 http://www.stonehenge.com/merlyn/> Perl/Unix/secu

Re: [GENERAL] php professional

2007-02-22 Thread Randal L. Schwartz
>>>>> "Mark" == Mark Walker <[EMAIL PROTECTED]> writes: Mark> Similar issues with Mysql. It's faster, But it doesn't matter *how* fast you get the *wrong* answer. :) -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095

Re: [GENERAL] exception handling in plperlu

2007-03-16 Thread Randal L. Schwartz
nd now either look at $@ (if you want to distinguish exception vs normal) or just defined $dbh (if you want to know if you have a useful handle or not). -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 http://www.stonehenge.com/merlyn/> Perl/Unix/security consultin

Re: [GENERAL] cutting out the middleperl

2007-03-27 Thread Randal L. Schwartz
pile of code. And please don't tell me you do all of that client-side. :) -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 http://www.stonehenge.com/merlyn/> Perl/Unix/security consulting, Technical writing, Comedy, etc. etc. See PerlTraining.Stonehenge.com for onsite a

Re: [GENERAL] pgsql and Mac OS X

2007-04-30 Thread Randal L. Schwartz
>>>>> "Tom" == Tom Allison <[EMAIL PROTECTED]> writes: Tom> /System/Library/CoreServices/RemoteManagement/rmdb.bundle/bin/psql That's not on my mac. Must be some bolt-on you installed. -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +

Re: [GENERAL] pgsql and Mac OS X

2007-04-30 Thread Randal L. Schwartz
src/include install Tom> gmake -C src/interfaces install Tom> gmake -C doc install Tom> instead of the usual "gmake install". The Randal Notebook recommends: fink install postgresql :-) Then you get automatic startup on boot, usernames added, etc. -- Randal L

Re: [GENERAL] what happened to the website?

2005-01-19 Thread Randal L. Schwartz
>>>>> "Bruno" == Bruno Wolff <[EMAIL PROTECTED]> writes: Bruno> http://en.wikipedia.org/wiki/Slashdot_effect Except that wikipedia itself is suffering from the Slashdot effect right now. :) -- Randal L. Schwartz - Stonehenge Consulting Serv

Re: [GENERAL] sending mail from Postgres

2005-12-27 Thread Randal L. Schwartz
to a simple Tony> socket server and send messages, plus lots of other function examples, Tony> some my own and some from the original function cookbook. I fear for the future. Did someone forget what a "database" is for? -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. -

Re: [GENERAL] Adding columns to a view

2005-12-28 Thread Randal L. Schwartz
n general, if it looks difficult to do with PostgreSQL, you're probably heading the wrong direction for good database design. -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 http://www.stonehenge.com/merlyn/> Perl/Unix/security consulting, Technical

Re: [GENERAL] sending mail from Postgres

2005-12-28 Thread Randal L. Schwartz
he notices as needed. That's the right level for this. Database triggers should be about adding rows, deleting rows, and modifying values in rows to manage integrity. It's the middleware that's responsible for repackaging that or acting on changed data. -- Randal L. Schwartz

[GENERAL] Oracle purchases Sleepycat - is this the "other shoe" for MySQL AB?

2006-02-14 Thread Randal L. Schwartz
Oracle purchases Sleepycat. From what I understand, BerkeleyDB was the "other" way that MySQL could have transactions if Oracle decided to restrict InnoDB tables (after purchasing Innobase last year). Does this mean the other shoe has dropped for MySQL AB? -- Randal L. Schwartz -

Re: [GENERAL] Oracle purchases Sleepycat - is this the "other shoe" for MySQL AB?

2006-02-15 Thread Randal L. Schwartz
oncurrent situations, Tom> in order to save a few cycles in single-user scenarios. Have MySQL Tom> officially abandoned the multi-user case to us? What they lose in usability, they gain back in benchmarks, and that's all that matters: getting the wrong answer really fast. -- Randal L.

Re: [GENERAL] cpan perl module - plperlu danger?

2006-06-22 Thread Randal L. Schwartz
been fixed rather rapidly. "few" ne "dozens". The main problem with Safe is that it's at the wrong granularity (per opcode, not per semantic operation). But let's not be throwing the baby out with the bathwater... Safe is 99.97% of the way there. -- Randal

Re: [GENERAL] Is my MySQL Gaining ?

2003-12-26 Thread Randal L. Schwartz
doing a poor job of integrating them. So, you can get PHP for 2007 already. It's called Perl, and it's probably already installed on your box. "PostgreSQL is where MySQL will be in five years" might be a good catchmeme. Anyone wanna run with it? -- Randal L. Schwartz - St

Re: [GENERAL] between

2003-12-26 Thread Randal L. Schwartz
r. It's not any more related to SELECT than it is anything else. It's a part of an expression. Expressions are used many places and described one place. That's the nature of documentation. Maybe I'm sounding grouchy, but at some point, you do the common sense thing. -- Randal

Re: [GENERAL] Postgress and MYSQL

2004-01-13 Thread Randal L. Schwartz
PostgreSQL from the high end (when you want a full-featured database). I think they've completely overlapped at this point (especially when I just discovered yesterday that you can register Perl callbacks for user-defined functions and aggregates in DBD::SQLite!), so MySQL really doesn't

Re: [GENERAL] High Reliability without High Availability?

2004-03-22 Thread Randal L. Schwartz
that connected up as triggers for all your changing items to either write a log, or use DBI to actually update the second database? -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 <[EMAIL PROTECTED]> http://www.stonehenge.com/merlyn/> Perl/Unix/security c

Re: [GENERAL] apple uses Postgres for RemoteDesktop 2

2004-08-17 Thread Randal L. Schwartz
at. If I recall correctly, OSX 10.1 and 10.2 froze in a bad beta of Perl 5.6.0 prerelease. Now it's been updated to at least a normal release (5.8.1, still a year behind, but that's life). -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 <[EMAIL PRO

Re: [GENERAL] PL/java?

2001-09-04 Thread Randal L. Schwartz
really have the experience to make that claim. You smell a bit like that now though, mostly through your ignorance of Perl. Maybe you're not "unfounded pro Java", but you are "unfounded anti Perl". And I won't allow that here. I'll certainly permit Perl to l

Re: [GENERAL] PL/java?

2001-09-05 Thread Randal L. Schwartz
it's been more the skillset of the programmers at stake rather than the languages. Gunnar> But having Java in the PgSQL backend would be nice for some, Gunnar> regardless of how well Java compares to Perl. Yes, I can support that. -- Randal L. Schwartz - Stonehenge Consulting

Re: [GENERAL] creating "user" table

2001-09-23 Thread Randal L. Schwartz
+- Ron| 35 Russ | 38 Randal | 39 (3 rows) demo=# You can quote any reserved word to get any name you want. You just need to think of the table name of demo as _ "demo" _. -- Randal L. Schwartz - Stonehenge Consulting Services, I

Re: [GENERAL] Birthsday list

2001-09-26 Thread Randal L. Schwartz
27;, dateofbirth ) +1 Svenne> as age, date_part('doy',dateofbirth)-date_part('doy',now()) + Svenne> date_part('day', (now() + '1 year'::interval)::timestamp - now()) as Svenne> daystogo from friends where date_part('doy',dateofbirt

Re: [GENERAL] [HACKERS] Tupple statistics function

2001-09-24 Thread Randal L. Schwartz
expensive if nobody calls it? I mean, it's not maintained like an index, is it? -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 <[EMAIL PROTECTED]> http://www.stonehenge.com/merlyn/> Perl/Unix/security consulting, Technical writing, Come

Re: [GENERAL] Function Help

2001-09-24 Thread Randal L. Schwartz
'::DATE)=5 THEN date(\'$1\')+1 Brian> WHEN date_part(\'dow\',\'$1\'::DATE)=6 THEN date(\'$1\')+0 Brian> END'LANGUAGE 'sql' Brian> I get an error that $1 is not a valid date. But I want that to be the Brian> variable I

Re: [GENERAL] Humor me: Postgresql vs. MySql (esp. licensing)

2003-10-08 Thread Randal L. Schwartz
0' as a valid datetime stamp.. something like that.. Shridhar> How much deviation is that from ACID? 180 degrees...:-) Unverified, but you can apparently try to store a huge number into a short integer, and MySQL silently truncates to maxint. No error. No warning. No place for it in a

Re: Triggers, Stored Procedures, PHP. was: Re: [GENERAL] PostgreSQL

2003-12-01 Thread Randal L. Schwartz
only? Sorry, cheap shot.) Please don't paint Python as nice and regular. It has nearly as many odd things to know as Perl does. -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 <[EMAIL PROTECTED]> http://www.stonehenge.com/merlyn/> Perl/Unix/security