Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
Zorro KingOfEngland
May 7, 2008

Suspicious Dish posted:

Comcast is looking at adding infrastructure to do the translation at the CO rather than at the home, so you talk IPv4 to the CO, and it talks IPv6 to the backbone.

Doesn't this not fix the problem that IPv6 is supposed to fix in the first place?

Adbot
ADBOT LOVES YOU

Hughlander
May 11, 2005

I'm just curious as to how that even works. If I have an IPv6 only address how do I open a socket to it if my local LAN is IPv4?

nielsm
Jun 1, 2009



Hughlander posted:

I'm just curious as to how that even works. If I have an IPv6 only address how do I open a socket to it if my local LAN is IPv4?

Presumably your router will run a tunnel endpoint and which you then connect to. So you tunnel across your own local network.

Actually that doesn't make much sense at all, why would you run an IPv4-only local network? If your router doesn't speak IPv6 it can't connect to an IPv6-only ISP anyway. If it does speak IPv6 then you will also be running IPv6 locally.

Edit: Or do you mean "my ISP is v4-only and I want to connect to a v6-only host"? Then you need a third-party tunnel provider, essentially like a proxy.

Hughlander
May 11, 2005

nielsm posted:

Presumably your router will run a tunnel endpoint and which you then connect to. So you tunnel across your own local network.

Actually that doesn't make much sense at all, why would you run an IPv4-only local network? If your router doesn't speak IPv6 it can't connect to an IPv6-only ISP anyway. If it does speak IPv6 then you will also be running IPv6 locally.

Edit: Or do you mean "my ISP is v4-only and I want to connect to a v6-only host"? Then you need a third-party tunnel provider, essentially like a proxy.

I was responding to the quote on this page:

Suspicious Dish posted:

Comcast is looking at adding infrastructure to do the translation at the CO rather than at the home, so you talk IPv4 to the CO, and it talks IPv6 to the backbone.

And not understanding how that would work with you trying to hit an IPv6 resource. Unless they're saying that your local network is IPv6, their router/cablemodem tunnels it over IPv4, then it becomes IPv6 again at the CO. At which point why bother? Is the last mile IPv6 really that impossible? (Seems like a networking horror to me!)

Blotto Skorzany
Nov 7, 2008

He's a PSoC, loose and runnin'
came the whisper from each lip
And he's here to do some business with
the bad ADC on his chip
bad ADC on his chiiiiip
Everything networking is a horror

pseudorandom name
May 6, 2007

Instead of a one-IPv4-to-many-IPv4 NAT, it is a one IPv6-to-many-IPv4 NAT (or even many-IPv6-to-many-IPv4).

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe

Hughlander posted:

And not understanding how that would work with you trying to hit an IPv6 resource. Unless they're saying that your local network is IPv6, their router/cablemodem tunnels it over IPv4, then it becomes IPv6 again at the CO.

I don't actually know how. It's just R&D right now, and it might just not pan out. They've just said that they've experimenting with IPv6-only routing while keeping existing IPv4-only devices, punting IPv6 to the CO.

Hughlander posted:

At which point why bother? Is the last mile IPv6 really that impossible?

This will only be the case for customers who do not have IPv6-aware networking equipment in their home. They don't want to tell their customers "go buy a new set of hardware or you will get cut off from the internet forever. We're doing the right thing, trust us".

Vanadium
Jan 8, 2005

My ISP is supposedly rolling out end-user ipv6 somewhere this fall. :shobon:

Quick, someone convince me that even with the liberal allocation schemes for ipv6 addresses we're not gonna run out in, like, 2073 when we realize we really gotta allocate a whole subnet to each of everybody's fridge's compartments!

VikingofRock
Aug 24, 2008




Vanadium posted:

My ISP is supposedly rolling out end-user ipv6 somewhere this fall. :shobon:

Quick, someone convince me that even with the liberal allocation schemes for ipv6 addresses we're not gonna run out in, like, 2073 when we realize we really gotta allocate a whole subnet to each of everybody's fridge's compartments!

IPv6 allows about 10^38 addresses. That's enough that if every person currently living replaced every atom of their body with a nanobot, and every nanobot needed a separate address, we would use something like 14% of available addresses.

taqueso
Mar 8, 2004


:911:
:wookie: :thermidor: :wookie:
:dehumanize:

:pirate::hf::tinfoil:

VikingofRock posted:

IPv6 allows about 10^38 addresses. That's enough that if every person currently living replaced every atom of their body with a nanobot, and every nanobot needed a separate address, we would use something like 14% of available addresses.

But if each nanobot had two fridges with 5 compartments...

Doctor w-rw-rw-
Jun 24, 2008

Suspicious Dish posted:

I don't actually know how. It's just R&D right now, and it might just not pan out. They've just said that they've experimenting with IPv6-only routing while keeping existing IPv4-only devices, punting IPv6 to the CO.


This will only be the case for customers who do not have IPv6-aware networking equipment in their home. They don't want to tell their customers "go buy a new set of hardware or you will get cut off from the internet forever. We're doing the right thing, trust us".


My source was Comcast itself.

6rd is 6to4, only the ISP prefix puts routing in their court, rather than a random third party tunneler. This is transitional, not permanent. Their solution appears to be IPv6 with basically a "4to6" of sorts - IPv4 is tunnelled instead of IPv6.

Also, the software they put out:

quote:

This is an extension of OpenWrt, and it offers two different types of tunneling support. The first is where the user only has an IPv4 address and tunnels IPv6, using 6RD. The second is where the user only has an IPv6 address and tunnels IPv4, using Dual-Stack Lite.

Doctor w-rw-rw- fucked around with this message at 23:52 on Jun 10, 2012

Malloc Voidstar
May 7, 2007

Fuck the cowboys. Unf. Fuck em hard.

Vanadium posted:

My ISP is supposedly rolling out end-user ipv6 somewhere this fall. :shobon:

Quick, someone convince me that even with the liberal allocation schemes for ipv6 addresses we're not gonna run out in, like, 2073 when we realize we really gotta allocate a whole subnet to each of everybody's fridge's compartments!
if 6.5 billion people each had a house with 6.5 billion devices, all of which were given an ipv6 address, we would still have 3.4*1038 addresses left, which is more than 2^96

pseudorandom name
May 6, 2007

There's enough IPv6 address to give one quadrillion of them to each star in the universe.

Strong Sauce
Jul 2, 2003

You know I am not really your father.





So what you're saying is, we're going to run out of IPv6 addresses because every atom in the universe wants to be a wifi hotspot?

Vanadium
Jan 8, 2005

I'm not literally expecting to run out of individual addresses I'm just wondering how all the subdivisioning is going to work out.

I'm gonna write up a thing like the short story where the computer scientists inadvertently create god, just with internet protocol revisions instead of bigger and bigger computers.

the talent deficit
Dec 20, 2003

self-deprecation is a very british trait, and problems can arise when the british attempt to do so with a foreign culture





Hughlander posted:

Is the last mile IPv6 really that impossible? (Seems like a networking horror to me!)

Yes? As long as you have a single customer using IPv4 only equipment you need an IPv4 network for them. How do you propose to have everyone in the world upgrade to IPv6 equipment?

Hughlander
May 11, 2005

the talent deficit posted:

Yes? As long as you have a single customer using IPv4 only equipment you need an IPv4 network for them. How do you propose to have everyone in the world upgrade to IPv6 equipment?

How does that relate to not having the last mile IPv6 though? You *CAN* run more than one network over the same L1 topography... The issue wasn't supporting IPv4 but rather supporting IPv6 only past the CO.

Doctor w-rw-rw-
Jun 24, 2008

the talent deficit posted:

Yes? As long as you have a single customer using IPv4 only equipment you need an IPv4 network for them. How do you propose to have everyone in the world upgrade to IPv6 equipment?

Last mile IPv6 is not mutually exclusive from last mile IPv4, and IPv4 can be tunneled everywhere else.

Getting back to horror, I have discovered a new horror: binary processing. Postgres' wire protocol is fantastic but oh god, bytes <-> Scala case classes* is so freaking tedious.

* close enough analogy: Scala POJOs

TOO SCSI FOR MY CAT
Oct 12, 2008

this is what happens when you take UI design away from engineers and give it to a bunch of hipster art student "designers"
http://seclists.org/oss-sec/2012/q2/493

while true; do mysql -u root mysql --password=fail; done

quote:

Here's the issue. When a user connects to MariaDB/MySQL, a token (SHA
over a password and a random scramble string) is calculated and compared
with the expected value. Because of incorrect casting, it might've
happened that the token and the expected value were considered equal,
even if the memcmp() returned a non-zero value.
In this case
MySQL/MariaDB would think that the password is correct, even while it is
not. Because the protocol uses random strings, the probability of
hitting this bug is about 1/256.

Which means, if one knows a user name to connect (and "root" almost
always exists), she can connect using *any* password by repeating
connection attempts. ~300 attempts takes only a fraction of second, so
basically account password protection is as good as nonexistent.
Any client will do, there's no need for a special libmysqlclient library.
how does this even happen

Scaevolus
Apr 16, 2007

Janin posted:

http://seclists.org/oss-sec/2012/q2/493

while true; do mysql -u root mysql --password=fail; done

how does this even happen

quote:

Synopsis

#include <string.h>
int memcmp(const void *s1, const void *s2, size_t n);


Description

The memcmp() function compares the first n bytes (each interpreted as unsigned char) of the memory areas s1 and s2. It returns an integer less than, equal to, or greater than zero if s1 is found, respectively, to be less than, to match, or be greater than s2.
It says <, =, or > 0, but on every platform you've used, memcmp returns -1, 0, or 1. (Or at least, values that fit in char range)

You stop thinking of the return value as an int, and more of something that you can do if (blah) to see if they're different-- so might as well return it as a boolean type, right? And C doesn't have bools, so we can just use chars.

Now someone does a crazy SIMD implementation that actually returns values using the full int range. You're screwed.

e:

code:
/* some header file somewhere */
typedef char my_bool

/* password.c */
my_bool
check_scramble(const char *scramble_arg, const char *message,
               const uint8 *hash_stage2)
{
  ...
  return memcmp(hash_stage2, hash_stage2_reassured, SHA1_HASH_SIZE);
}
ouch

Scaevolus fucked around with this message at 05:49 on Jun 11, 2012

Doctor w-rw-rw-
Jun 24, 2008
Can't say I'm particularly surprised, though; MySQL is a horror in itself - IMO, sort of like the PHP of databases. As far as SQL databases go, I would advocate PostgreSQL for any new code.

PrBacterio
Jul 19, 2000

Scaevolus posted:

code:
  return memcmp(hash_stage2, hash_stage2_reassured, SHA1_HASH_SIZE);
But how would anyone ever not write
code:
return memcmp(...)!=0;
in that case? Personally I would do that even just because the possibility of the return value being -1 (instead of 1) would bother me :eng99:

Zombywuf
Mar 29, 2008

PrBacterio posted:

But how would anyone ever not write
code:
return memcmp(...)!=0;

More importantly, why would anyone ever write:
C code:
typedef char my_bool;

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe
What should you write instead? stdbool.h is C99.

Bruegels Fuckbooks
Sep 14, 2004

Now, listen - I know the two of you are very different from each other in a lot of ways, but you have to understand that as far as Grandpa's concerned, you're both pieces of shit! Yeah. I can prove it mathematically.

Suspicious Dish posted:

What should you write instead? stdbool.h is C99.

If I saw something called my_bool in someone else's code, it'd never occur to me that it was really a char without looking up how it was defined in the header and it would really piss me off - he'd have been better off just having a return type of char.

Hammerite
Mar 9, 2007

And you don't remember what I said here, either, but it was pompous and stupid.
Jade Ear Joe

Doctor w-rw-rw- posted:

Can't say I'm particularly surprised, though; MySQL is a horror in itself - IMO, sort of like the PHP of databases. As far as SQL databases go, I would advocate PostgreSQL for any new code.

On occasion I've searched for comparisons between MySQL and PostgreSQL, but I've yet to find a good one. Can you suggest one?

NB. I would suggest the following criteria apply for deciding whether a comparison is "good":

- should not be out of date (it's easy to search and find articles that claim, for example, that in MySQL you can't use subqueries, even though that hasn't been true for years)
- should not be biased in one direction
- should not be overly fussy about adherence to the ANSI standard (not that standards are irrelevant, but as long as deviation from the standard isn't really egregious I don't care about it as much as I care about functionality)
- shouldn't fuss about issues that can be overcome by correctly configuring the software (take it for granted that MySQL should always be running in strict mode; naturally this goes the other way too and means that it should be assumed that PostgreSQL has been properly set up for the user's needs)

I had a serious look at using PostgreSQL a while back but was not convinced that doing so would be worth the hassle. You gain some things, like CHECK constraints, while losing some others (per-column character sets and collations, more integer data types than guaranteed by the standard)

hobbesmaster
Jan 28, 2008

hieronymus posted:

If I saw something called my_bool in someone else's code, it'd never occur to me that it was really a char without looking up how it was defined in the header and it would really piss me off - he'd have been better off just having a return type of char.

Do you want an unsigned char or something? What else are you supposed to do in C89?

Zombywuf
Mar 29, 2008

Hammerite posted:

I had a serious look at using PostgreSQL a while back but was not convinced that doing so would be worth the hassle. You gain some things, like CHECK constraints, while losing some others (per-column character sets and collations, more integer data types than guaranteed by the standard)

Why, for the love of Codd, would you want per column character sets?

In general you are not going to find good comparisons between MySQL and Postgres, most people will not be using both of them to the kind of degree you would need for a comparison. Postgres has been ahead of MySQL for some time now, and I have no reason to believe it's changed. I can't really help as it would require a choir of actual angels to descend to earth and explain, in detail, with slides, why MySQL has improved beyond Postgres.

PrBacterio
Jul 19, 2000

hobbesmaster posted:

Do you want an unsigned char or something? What else are you supposed to do in C89?
In C without built-in boolean type I just usually pass and return boolean flags as a plain "int". Ie. I always just write something like
C++ code:
int is_some_condition_true(void) {...}

Janitor Prime
Jan 22, 2004

PC LOAD LETTER

What da fuck does that mean

Fun Shoe
At this point the biggest deal breaker is the licensing for each project. MySQL's jdbc driver is GPL and Postgres' is BSD. We actually had to switch to Postgres because we couldn't get any sane licensing from MySQL after the Oracle takeover.

Hammerite
Mar 9, 2007

And you don't remember what I said here, either, but it was pompous and stupid.
Jade Ear Joe

Zombywuf posted:

Why, for the love of Codd, would you want per column character sets?

Handy if you want to use UTF-8 to support internationalisation, but also want to use ASCII text for some key columns used internally. For example, if you have a table of user privileges you might use (say) a CHAR(20) CHARACTER SET ascii COLLATE ascii_bin NOT NULL as the primary key so that you can identify privileges by descriptive names. You don't want the indexed column to be 80 bytes when it should be 20 bytes.

pseudorandom name
May 6, 2007

Why would it be 80 bytes?

edit: Oh, right, CHAR, not VARCHAR. Nevermind.

edit #2: Of course your example doesn't really work when comparing MySQL to PostgreSQL, because:

The PostgreSQL manual posted:

Tip: There is no performance difference among these three types, apart from increased storage space when using the blank-padded type, and a few extra CPU cycles to check the length when storing into a length-constrained column. While character(n) has performance advantages in some other database systems, there is no such advantage in PostgreSQL; in fact character(n) is usually the slowest of the three because of its additional storage costs. In most situations text or character varying should be used instead.

pseudorandom name fucked around with this message at 18:37 on Jun 11, 2012

Janitor Prime
Jan 22, 2004

PC LOAD LETTER

What da fuck does that mean

Fun Shoe

Hammerite posted:

Handy if you want to use UTF-8 to support internationalisation, but also want to use ASCII text for some key columns used internally. For example, if you have a table of user privileges you might use (say) a CHAR(20) CHARACTER SET ascii COLLATE ascii_bin NOT NULL as the primary key so that you can identify privileges by descriptive names. You don't want the indexed column to be 80 bytes when it should be 20 bytes.

In MySQL they would only be 60 bytes :eng99:

Doctor w-rw-rw-
Jun 24, 2008

Hammerite posted:

On occasion I've searched for comparisons between MySQL and PostgreSQL, but I've yet to find a good one. Can you suggest one?

NB. I would suggest the following criteria apply for deciding whether a comparison is "good":

- should not be out of date (it's easy to search and find articles that claim, for example, that in MySQL you can't use subqueries, even though that hasn't been true for years)
- should not be biased in one direction
- should not be overly fussy about adherence to the ANSI standard (not that standards are irrelevant, but as long as deviation from the standard isn't really egregious I don't care about it as much as I care about functionality)
- shouldn't fuss about issues that can be overcome by correctly configuring the software (take it for granted that MySQL should always be running in strict mode; naturally this goes the other way too and means that it should be assumed that PostgreSQL has been properly set up for the user's needs)

I had a serious look at using PostgreSQL a while back but was not convinced that doing so would be worth the hassle. You gain some things, like CHECK constraints, while losing some others (per-column character sets and collations, more integer data types than guaranteed by the standard)

It takes advantage of multiple cores better, it was engineered to be correct first and fast second, whereas MySQL was the opposite, and after all these years the speed advantage has lessened. It also has PostGIS, much, much better time support (there are useful time functions that account for time zones, and you can group by time slices and more), and a number of interesting extensions. I think its default encoding is something sane and not latin-swedish or something.

MySQL has better replication, from what I hear.

Postgres's docs are good; I've been writing a Postgres driver for fun and so far it's actually been really straightforward, because the wire protocol spec is well-documented.

That's about all I know.

Hammerite
Mar 9, 2007

And you don't remember what I said here, either, but it was pompous and stupid.
Jade Ear Joe

MEAT TREAT posted:

In MySQL they would only be 60 bytes :eng99:

I'm aware of MySQL's misnamed "utf8" character set. When I talk about using UTF-8 you may assume I'm considering the utf8mb4 character set.

Although, that brings up another possible example for per-column character sets. I could see the possibility that you might want to offer UTF-8 support but want to restrict some columns to be BMP characters only. For example, perhaps you might want to allow user names only to use BMP characters.

Hammerite
Mar 9, 2007

And you don't remember what I said here, either, but it was pompous and stupid.
Jade Ear Joe

Doctor w-rw-rw- posted:

It takes advantage of multiple cores better, it was engineered to be correct first and fast second, whereas MySQL was the opposite, and after all these years the speed advantage has lessened. It also has PostGIS, much, much better time support (there are useful time functions that account for time zones, and you can group by time slices and more), and a number of interesting extensions. I think its default encoding is something sane and not latin-swedish or something.

MySQL has better replication, from what I hear.

Postgres's docs are good; I've been writing a Postgres driver for fun and so far it's actually been really straightforward, because the wire protocol spec is well-documented.

That's about all I know.

When you voiced strong opinions on MySQL I assumed they were also highly-informed opinions, but I guess I was wrong to do that. When you said "As far as SQL databases go, I would advocate PostgreSQL for any new code", I suppose I should have read "I would use Postgres if I were you, I heard someone used MySQL once and it filled his computer with SPIDERS"

Doctor w-rw-rw-
Jun 24, 2008

Hammerite posted:

When you voiced strong opinions on MySQL I assumed they were also highly-informed opinions, but I guess I was wrong to do that. When you said "As far as SQL databases go, I would advocate PostgreSQL for any new code", I suppose I should have read "I would use Postgres if I were you, I heard someone used MySQL once and it filled his computer with SPIDERS"

Nope, I'm just parroting a rough compilation of what people have told me who work with databases at high-volume websites, including the one I work at, which uses PHP/MySQL.

Hammerite
Mar 9, 2007

And you don't remember what I said here, either, but it was pompous and stupid.
Jade Ear Joe

pseudorandom name posted:

Why would it be 80 bytes?

edit: Oh, right, CHAR, not VARCHAR. Nevermind.

edit #2: Of course your example doesn't really work when comparing MySQL to PostgreSQL, because:

quote:

Tip: There is no performance difference among these three types, apart from increased storage space when using the blank-padded type, and a few extra CPU cycles to check the length when storing into a length-constrained column. While character(n) has performance advantages in some other database systems, there is no such advantage in PostgreSQL; in fact character(n) is usually the slowest of the three because of its additional storage costs. In most situations text or character varying should be used instead.

Isn't that comparing the behaviour of CHAR, VARCHAR and TEXT column types (or the Postgres equivalents thereof) of a specific character set, rather than comparing index sizes/behaviour for a particular column type for various character sets? I'm not convinced this note from the Postgres manual demonstrates what you say it does. (by the way here is the manual page if anyone wants to read it.)

McGlockenshire
Dec 16, 2005

GOLLOCKS!

Hammerite posted:

On occasion I've searched for comparisons between MySQL and PostgreSQL, but I've yet to find a good one. Can you suggest one?

I wrote one a while ago, but can't seem to find it. I guess I'll just have to recreate it here.

The biggest and most annoying difference that I've found is in user management and connection configuration. Postgres connection configuration is done through a config file, and it can be a real pain in the rear end to conceptualize. Thankfully, it can also authenticate against external sources, like PAM and LDAP. MySQL can do that also, but you have to pay for it or use a third-party distro. Like MySQL, Postgres users (roles) have permissions. Unlike MySQL, entities actually have an owner. This makes permission management a major complexity if you (correctly) use a multi-role setup with different users for installation/maintenance and day-to-day use. This also makes multi-tenant setup difficult (shared hosting).

The second huge difference is in performance tweaking. Absolutely none of the performance tweaking knowledge that you've learned by playing with MySQL is going to apply to Postgres. They are wildly different animals. The query planner in Postgres also isn't functionally retarded, so you don't need to do wacky things like putting subqueries in the FROM clause in order to avoid profoundly stupid behavior. EXPLAIN output is also very, very different. So are all of the I/O optimizations, not that you'd generally need any.

Most of the other little things that stick out are day-to-day usage quirks/anti-quirks:
  • Postgres uses ANSI-compliant double quotes for identifiers and single quotes for values. MySQL uses backticks for identifiers and either singles or doubles for values. MySQL also supports ANSI syntax, if you turn it on.
  • Postgres identifiers are case-insensitive and forced to lower-case unless you use double quotes to create and reference them. This can be irritating if you're a fan of camel-case tables or columns.
  • Postgres doesn't let you define non-primary keys at table define time. You have to use CREATE INDEX instead. MySQL also supports this syntax.
  • Postgres doesn't have anything like MySQL's ENUM data type. Postgres enumerations are first-class data types defined at the system level, and they're a real bear to work with. If you just need a list of valid inputs for a field, you can use a CHECK clause.
  • Related: Postgres actually understands CHECK clauses. They are beautiful.
  • Related: Postgres lets you define complex data types (multiple columns, etc) as a data type.
  • Related: Postgres has arrays, both at a column level and at a procedure/function level.
  • Postgres doesn't have anything like REPLACE INTO or INSERT INTO ... ON DUPLICATE KEY UPDATE.
  • Postgres doesn't have BLOBs. Instead, it has a data type called a "bytea" -- byte array. Until recently, byteas required some annoying hoop jumping to work with. You shouldn't be storing binary data in your database anyway, if you can help it.
  • Older versions of Postgres require you to name all columns in a GROUP BY clause. MySQL lets you omit as many columns as you'd like, simply picking whatever values it felt were best for the excluded columns. As of 9.1 or 9.2, Postgres now lets you exclude columns as long as there's a unique or primary key that's already being grouped.
  • MySQL calls the thing that contains tables and functions and views a "database." Postgres uses the ANSI-compliant term "schema" for that kind of thing. You can put multiple schemas... schemata... whatever... in a database. You can do cross-schema queries, but not cross-database queries.
  • Postgres does not have an unsigned integer data type.
  • Postgres does not permit string length qualifiers on integer data types. I have no idea why MySQL does.
  • Postgres considers VARCHAR and TEXT to be the same thing (as others have noted). So does InnoDB since MySQL 5.1 or so.
  • Postgres has a real BOOL data type. It exposes true values as the string literal "t" and false values as the string literal "f". This can be maddening if you're working in a language with dynamic data types, where string literal "f" is equal to a true value.
  • Postgres can do DDL (create, alter, etc) inside of a transaction. In MySQL, DDL inside of a transaction performs an implicit (silent) commit.
  • Postgres doesn't have storage engines. Fulltext always works, though the syntax is funny.
  • Postgres has traditionally had some pretty harsh casting rules. Modern versions have relaxed these quite a bit, through you will still need to perform some casting from time to time in order to get things working correctly. :: is the casting operator, like '1234'::integer.
  • Postgres has a wide variety of languages in which you can write stored procedures and functions, including but not limited to SQL itself, Javascript (via v8), PHP, Perl, Python, Ruby, Java, etc. MySQL limits you to SQL and compiled C extensions.
  • Postgres 9.1 and 9.2 have built-in replication, single-master, multiple-slave. Replication must be done with all data in the installation, you can't pick or choose databases or tables. The built in replication doesn't do multi-master. There are lots of third-party replication solutions, almost all based on triggers, that offer more complex or interesting options.
  • Postgres does character set validation of text fields. If you try to insert character sequences into a field that are not supported by the character set, you will get an error.
  • Related: Postgres doesn't let you silently insert junk. If it can't coerce something into a type without data loss, and you haven't expressly done a cast, it's going to throw an error.

McGlockenshire fucked around with this message at 19:47 on Jun 11, 2012

Adbot
ADBOT LOVES YOU

Hammerite
Mar 9, 2007

And you don't remember what I said here, either, but it was pompous and stupid.
Jade Ear Joe

Thanks for the overview, that's good information. You should upload it somewhere, rather than let it get buried in this thread.

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply