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
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
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,
. 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
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. -
>>>>> "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
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
>>>>> "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
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.
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
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. -
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
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. - +
>>>>> "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>
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.
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
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.
+[.]?){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 *
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
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
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
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
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
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
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
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
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
>>>>> "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
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
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
>>>>> "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. - +
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
>>>>> "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
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. -
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
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
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 -
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.
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
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
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
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
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
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
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
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
+-
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
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
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
'::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
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
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
52 matches
Mail list logo