A government protecting private property (not that Somalia had a government until very recently) could be considered as being interventionist.
Yup, that's what separates the libertarians from the anarchists. Libertarians believe the only legitimate purpose of government is to protect private property, personal liberties, and safety from other people. Anarchists believe that there is no legitimate purpose for government.
No, it's a joke. Lighten up, I really thought his post added to the discussion, and did indeed have some insight into the historical culture of the French.
Also note that some people mod jokes as insightful if the insight is more important than the raw humor portion of the joke.
just as the unrestrained laissez-fair US economy of 1900-1920 was beginning to eat itself into a Great Depression
The Great Depression wasn't caused by the stock market. The Great Depression was caused by many factors, including the depressions in Europe and the economic isolation of the U.S. that lead to other countries economically isolating themselves.
I stand by my point: if drugs were legal, they would be consumed at a higher rate. I understand what you're saying, that if you try to suppress drugs or alcohol there can be unintended consequences. I'm in agreement. But making drugs illegal drives the price of drugs up, which means the quantity demanded is lower.
Again, I don't advocate prohibition. But let's be realistic that drug use will increase.
Long term success is not determined by your grades. In the short term, you may get the job, but why would you want to be misplaced in the job market? If you're misplaced in your career, you will not be successful in the long term.
Test taking ability should be used to avoid underrepresenting yourself. You shouldn't try to overrepresent yourself on a test. In general, you shouldn't try to cram your way into relationships (business or personal) that aren't really a good match.
That's something that people continuously repeat that just isn't true. It's like saying that the "War on Murder" has failed. Enforcement against the abuse of drugs does reduce the consumption of those drugs. Of course people still abuse drugs, but people would abuse drugs a lot more if they were legal. No enforcement action is 100% effective, and the War on Drugs is no exception.
That being said, the "War on Drugs" has a huge cost, in terms of money and in terms of liberty. Personally, I don't think it's worth it. But that's my opinion. Above are the facts, and I don't ignore those facts just to rationalize my opinion. You shouldn't either.
multiply the purchase price by 10 or so...should be a standard time-to-fix
This is getting way too complex. By mandating that software publishers are liable, you actually have to prevent people from entering contracts that limit liability. And if you start mandating bug fix windows, chaos will ensue. Vendors would just release "patches" that eliminate huge chunks of code to "fix" the bug and then nobody would download it.
Losses in the private sector serve an important economic function just like profits.
Sun is obviously not using these workers to their full potential. They have many highly qualified engineers and not enough customers. These employees will find work elsewhere. Most of these people anticipated this outcome to one degree or another, and should have prepared.
Losing a job is just part of a career. It's not necessarily bad. Loyalty on either side is only efficient to a certain point before it becomes a burden.
And "maximizing shareholder value" is not bad either. It's important because the board of directors is essentially spending other people's money, so they have a responsibility to pay attention to important economic indicators. Losses and profits might not be perfect measures of economic value, but those are the best measures we have. Any attempt in the past to ignore prices, profits, or losses has been a miserable failure.
It seems strange to me that this could even be considered an injection hole on Postgres's end of things.
It isn't really a postgresql hole, it's just that if the client sent an invalid multibyte string than postgresql would accept it in the past. Now it throws an error, which is better behavior. It has the potential to break backwards compatibility though, so anytime that is the case the PostgreSQL team takes it very seriously.
Maybe someone can point out a case where parameterized PreparedStatement style SQL is NOT a good idea
I think it's always a good idea, did you have a problem in mind? The main thing with escaping is, always use the recommended native database escaping functions. You can use them directly, but in many cases it's much easier to use parameterized statements which will call the native escaping function for you in a portable way (which is a big help if you want to support multiple databases).
Yes, you're correct. I assume that the string escaping is done using an almost identical function though, right? Surely it would produce the same results as PQescapeStringConn.
The way I understand it, the tuple is written first at the end of the file containing that portion of the table in question. But it is written asynchronously, meaning that it may stay in the OS Buffer Cache.
When the COMMIT comes, PostgreSQL writes sequentially to the WAL, but this time it writes synchronously.
That way, if there is a power failure, the data pages in the buffer cache holding the tuples may be lost, but the WAL contains enough information to reconstruct any committed transaction.
THis would mean that the disk would receive a new write instruction for every insert
No, often INSERTs will stay in the OS buffer cache until COMMIT time.
You still need to speed that up by about seven times to get 35k/s inserts.
I was trying to show that it's not out of the question. I don't have particularly good I/O on my machine, and I have a slow processor. The disk does not need to be written until COMMIT time, and it can be written sequentially (thanks to the write-ahead log). If there are several processors and a connection per processor, I could imagine that this type of benchmark could approach the write speed of the disk.
INSERTs aren't expensive in PostgreSQL. They can be if there are a lot of constraints and indexes, but in general they aren't. That guy could have been telling the truth. The poster who accused him of BS probably assumed that he meant 35k transactions/sec. 35k transactions/sec sounds unrealistic to me, since PostgreSQL can only COMMIT once per disk revolution (assuming "normal" non-RAID hardware).
Would the Postgres implementation of JDBC use 'addslashes()' to bind variables in a prepared statement?
No. Addslashes is a PHP function that many people use. It's not recommended for use with any database.
JDBC would use the correct string escaping routines in the postgresql client library, PQescapeStringConn. That is perfectly safe.
In fact, it appears the only real changes they made were to break bad code that produced invalid multibyte sequences. They also broke the use of the " \' " (backslash + single quote) sequence in unsafe situations that involve multibyte, client-only encodings.
Everything the postgresql people did seemed quite reasonable and only breaks code that was broken to begin with. The announcement was a little cryptic and short on the technical details, but the release notes fill in the blanks. The reason they probably worded the announcement that way was to call attention to poor use of addslashes in php, or other naive escaping tricks. Just use the built-in client library escaping functions, and everything is fine.
Well, I was thinking that it might be possible if you bunched enough of them into the same transaction, had sufficiently small updates, used a single prepared statement over and over, turned fsync off, and had HUGE amounts of memory, then, perhaps?
You don't need to do all that.
The command: time ruby -e 'puts "BEGIN;"; for i in 1..35000 do puts "INSERT INTO a VALUES(#{i});" end; puts "COMMIT;"' |./81/bin/psql test
Gives me about 7-8 seconds with write caching off, fsync on. Yes, I turned off write caching with hdparm. This is on my PC, with an el-cheapo IDE drive and a modest 1GB of RAM.
If you think about it, why should it take a long time? It's all one transaction. It's basically just writing the data to a file (the log). The table "a" is just an int field, obviously. And with postgresql's MVCC, an INSERT is very cheap.
You'll see that they are pretty much orthogonal concepts.
I disagree. A republic forms a structure, the purpose of which is to limit the power of the majority. Limiting the power of the majority is interdependent with democracy, and therefore the variables are dependent (and therefore not orthogonal).
China limits majority power in bad, overbearing, oppressive ways.
The U.S. limits majority power in good, limited ways. The limitation on the power of the majority is itself limited by the Constitution, which allows democratic influences in some areas. That means that, in effect, the U.S. can sometimes resemble a democracy but is indeed a republic. Sometimes the undemocratic aspects of our society are less obvious than the democratic aspects. For instance, we do not see a vote to censor an unpopular viewpoint, because that is Unconstitutional. However, we do see votes for president, which are much more obvious and get much more media attention. Something being prevented (by our republic) is much less obvious than something that actually happens.
The strength of a democracy iies in the priciples behind it and not in the structurse established.
That rejects the republican principles on which this country was founded in favor of democracy. The "structure established" is our republic, which, among other things, prevents the majority from censoring the minority.
Please see my other posts in this thread for a more thorough argument that we do not live in a democracy, but instead in a republic that employs some principles of democracy.
America is a Democracy. The legislature is answerable to the people.
And the judiciary isn't. So it's not really a democracy, is it? It has some democratic influences, but clearly a large part of the government is undemocratic, and the rest is indirectly democratic.
The decision, IMO, goes right against the 5th amendment that says:... nor shall private property be taken for public use...
I agree wholeheartedly. The protections of private property in the 5th and 14th Amendments are extended to all localities in the U.S.
The SC said that the increased local taxes provided by taking people's land was a "public purpose". Anything can be argued to be a "public purpose" but the Constitutional standard is "public use". That means you can't use eminent domain to transfer the land from one private party to another.
In effect, the SCOTUS completely removed that provision in the 5th Amendment, which is entirely Unconstitutional. That provision has meaning, and obviously the liberals on the SC didn't like the meaning. So much for the facade of the liberals standing up for the little guy.
It is not just the limits on majority rule that make us undemocratic.
Judges (Federal) and justices are not government by the people. They are appointed, which is in direct conflict of your definition of democracy. An appointment is a government by the government. If you include multiple levels of indirection in your definition of "democracy", the word simply has no meaning to you and any government is "democratic".
Clearly, we employ principles inspired by democracy. I acknowledged that. But equally clearly, we are a republic, first and foremost. The specifics of our republic are based on varying degrees of democratic influence for various government positions. Consider that it is only recently that even Senators are elected directly.
PS: Don't forget about an entire branch of the government (the judiciary). It makes you sound like an idiot.
Not all judges are elected, but most are not "appointed for life."
Federal judges are appointed for life. There are more than 9 federal judges in the U.S. Are you seriously that dense?
Judges and Justices are subjected to a certain level of democratic influence, like anything else. And I suppose that you could also say that even a federal judge can be impeached. But what I was talking about was judges who make precedent law without much in the way of checks and balances. The guy on the bench hearing your case for the speeding ticket is unlikely to change the way millions of Americans live with the stroke of a pen. A federal judge might.
But you didn't really care to argue with my point. Instead you leaped at the chance to try to correct my generalization, with exceptions to the rule that are totally irrelevent to my point. If you just wanted to set the record straight, make a quick, courteous, informative correction and move on. No need for name calling. You didn't even provide the information you claimed that I didn't know. Which judges are appointed for life, and which aren't? What is the process for removing each type of judge? What is the process for selecting each judge, and how much role does democracy play in that selection?
Our "Democratic Republic" is a republic, and not a democracy. The post I responded to suggested that democracy was the most important aspect of this country, more so than the structure of the laws. That is the antithesis of a republic.
A republic has certain important restrictions on the power of the majority. For instance, many actions require a supermajority. A democratic republic brings some of the benefits of democracy, but the restrictions are designed to prevent problems that have existed in ancient democracies. Democracy is not a new concept.
Our particular republic is unique because of the types of restrictions on the democracy, like preventing the majority from censoring the minority. "Democratic Republic" is merely the name we like to give to our particular republic because it employs some principles of democracy, like electing representatives in government, and a chance to indirectly elect the president. But clearly it rejects the overall democratic philosophy that the majority is right. The most obvious examples that our republic rejects democracy is that judges are not democratically elected, and the accused are not democratically convicted.
Sometimes the law is ambiguous or conflicting. In that case, the judge should be as conservative as possible, by which I mean the judge should avoid any decisions that change the status quo. He should then issue in his opinion a criticism of the conflicting laws, and suggest that they be clarified.
Of course, if one law supercedes another, the greater law holds.
That is an interesting case. No doubt, if an Act of Congress is Unconstitutional, I believe that the SCOTUS should indeed recognize the higher power of the Constitution, and declare the conflicting Act (or perhaps the conflicting portions of the Act) void.
That being said, the SCOTUS is not the final arbiter of the Constitution. Some of their recent decisions show that 9 people are not responsible enough to hold that position. One recent example is the Kelo decision (Oh, and did you notice that the people on the correct side of the decision are all the conservatives?). I suppose in the case where the SCOTUS is in direct conflict with the Constitution itself, it is the duty of Congress to impeach the offending members of the Court.
Unfortunately, there aren't any nice ways to correct the mistakes of a judge, especially when they sit on the Supreme Court. It takes a long time for those decisions to be overturned, and for decisions like Kelo, it may never happen.
A government protecting private property (not that Somalia had a government until very recently) could be considered as being interventionist.
Yup, that's what separates the libertarians from the anarchists. Libertarians believe the only legitimate purpose of government is to protect private property, personal liberties, and safety from other people. Anarchists believe that there is no legitimate purpose for government.
The article did include the word "soccer". Read it.
Erm, this is a troll, yeah?
No, it's a joke. Lighten up, I really thought his post added to the discussion, and did indeed have some insight into the historical culture of the French.
Also note that some people mod jokes as insightful if the insight is more important than the raw humor portion of the joke.
just as the unrestrained laissez-fair US economy of 1900-1920 was beginning to eat itself into a Great Depression
The Great Depression wasn't caused by the stock market. The Great Depression was caused by many factors, including the depressions in Europe and the economic isolation of the U.S. that lead to other countries economically isolating themselves.
You can't get much more hands-off than Somalia.
Somalia doesn't protect private property. If it did, maybe it's economy would be in better shape.
I stand by my point: if drugs were legal, they would be consumed at a higher rate. I understand what you're saying, that if you try to suppress drugs or alcohol there can be unintended consequences. I'm in agreement. But making drugs illegal drives the price of drugs up, which means the quantity demanded is lower.
Again, I don't advocate prohibition. But let's be realistic that drug use will increase.
Long term success is not determined by your grades. In the short term, you may get the job, but why would you want to be misplaced in the job market? If you're misplaced in your career, you will not be successful in the long term.
Test taking ability should be used to avoid underrepresenting yourself. You shouldn't try to overrepresent yourself on a test. In general, you shouldn't try to cram your way into relationships (business or personal) that aren't really a good match.
Face it, the "War on Drugs" failed.
That's something that people continuously repeat that just isn't true. It's like saying that the "War on Murder" has failed. Enforcement against the abuse of drugs does reduce the consumption of those drugs. Of course people still abuse drugs, but people would abuse drugs a lot more if they were legal. No enforcement action is 100% effective, and the War on Drugs is no exception.
That being said, the "War on Drugs" has a huge cost, in terms of money and in terms of liberty. Personally, I don't think it's worth it. But that's my opinion. Above are the facts, and I don't ignore those facts just to rationalize my opinion. You shouldn't either.
multiply the purchase price by 10 or so...should be a standard time-to-fix
This is getting way too complex. By mandating that software publishers are liable, you actually have to prevent people from entering contracts that limit liability. And if you start mandating bug fix windows, chaos will ensue. Vendors would just release "patches" that eliminate huge chunks of code to "fix" the bug and then nobody would download it.
Losses in the private sector serve an important economic function just like profits.
Sun is obviously not using these workers to their full potential. They have many highly qualified engineers and not enough customers. These employees will find work elsewhere. Most of these people anticipated this outcome to one degree or another, and should have prepared.
Losing a job is just part of a career. It's not necessarily bad. Loyalty on either side is only efficient to a certain point before it becomes a burden.
And "maximizing shareholder value" is not bad either. It's important because the board of directors is essentially spending other people's money, so they have a responsibility to pay attention to important economic indicators. Losses and profits might not be perfect measures of economic value, but those are the best measures we have. Any attempt in the past to ignore prices, profits, or losses has been a miserable failure.
It seems strange to me that this could even be considered an injection hole on Postgres's end of things.
It isn't really a postgresql hole, it's just that if the client sent an invalid multibyte string than postgresql would accept it in the past. Now it throws an error, which is better behavior. It has the potential to break backwards compatibility though, so anytime that is the case the PostgreSQL team takes it very seriously.
Maybe someone can point out a case where parameterized PreparedStatement style SQL is NOT a good idea
I think it's always a good idea, did you have a problem in mind? The main thing with escaping is, always use the recommended native database escaping functions. You can use them directly, but in many cases it's much easier to use parameterized statements which will call the native escaping function for you in a portable way (which is a big help if you want to support multiple databases).
Is it possible to do that with JDBC? All I see in the PreparedStatement object is things like "setInt(int,int)".
Yes, you're correct. I assume that the string escaping is done using an almost identical function though, right? Surely it would produce the same results as PQescapeStringConn.
I thought the WAL was written before the tuple.
The way I understand it, the tuple is written first at the end of the file containing that portion of the table in question. But it is written asynchronously, meaning that it may stay in the OS Buffer Cache.
When the COMMIT comes, PostgreSQL writes sequentially to the WAL, but this time it writes synchronously.
That way, if there is a power failure, the data pages in the buffer cache holding the tuples may be lost, but the WAL contains enough information to reconstruct any committed transaction.
THis would mean that the disk would receive a new write instruction for every insert
No, often INSERTs will stay in the OS buffer cache until COMMIT time.
You still need to speed that up by about seven times to get 35k/s inserts.
I was trying to show that it's not out of the question. I don't have particularly good I/O on my machine, and I have a slow processor. The disk does not need to be written until COMMIT time, and it can be written sequentially (thanks to the write-ahead log). If there are several processors and a connection per processor, I could imagine that this type of benchmark could approach the write speed of the disk.
INSERTs aren't expensive in PostgreSQL. They can be if there are a lot of constraints and indexes, but in general they aren't. That guy could have been telling the truth. The poster who accused him of BS probably assumed that he meant 35k transactions/sec. 35k transactions/sec sounds unrealistic to me, since PostgreSQL can only COMMIT once per disk revolution (assuming "normal" non-RAID hardware).
Would the Postgres implementation of JDBC use 'addslashes()' to bind variables in a prepared statement?
l ease.html#RELEASE-8-1-4
No. Addslashes is a PHP function that many people use. It's not recommended for use with any database.
JDBC would use the correct string escaping routines in the postgresql client library, PQescapeStringConn. That is perfectly safe.
In fact, it appears the only real changes they made were to break bad code that produced invalid multibyte sequences. They also broke the use of the " \' " (backslash + single quote) sequence in unsafe situations that involve multibyte, client-only encodings.
Read more at the release notes:
http://www.postgresql.org/docs/8.1/interactive/re
Everything the postgresql people did seemed quite reasonable and only breaks code that was broken to begin with. The announcement was a little cryptic and short on the technical details, but the release notes fill in the blanks. The reason they probably worded the announcement that way was to call attention to poor use of addslashes in php, or other naive escaping tricks. Just use the built-in client library escaping functions, and everything is fine.
Well, I was thinking that it might be possible if you bunched enough of them into the same transaction, had sufficiently small updates, used a single prepared statement over and over, turned fsync off, and had HUGE amounts of memory, then, perhaps?
./81/bin/psql test
You don't need to do all that.
The command:
time ruby -e 'puts "BEGIN;"; for i in 1..35000 do puts "INSERT INTO a VALUES(#{i});" end; puts "COMMIT;"' |
Gives me about 7-8 seconds with write caching off, fsync on. Yes, I turned off write caching with hdparm. This is on my PC, with an el-cheapo IDE drive and a modest 1GB of RAM.
If you think about it, why should it take a long time? It's all one transaction. It's basically just writing the data to a file (the log). The table "a" is just an int field, obviously. And with postgresql's MVCC, an INSERT is very cheap.
You'll see that they are pretty much orthogonal concepts.
I disagree. A republic forms a structure, the purpose of which is to limit the power of the majority. Limiting the power of the majority is interdependent with democracy, and therefore the variables are dependent (and therefore not orthogonal).
China limits majority power in bad, overbearing, oppressive ways.
The U.S. limits majority power in good, limited ways. The limitation on the power of the majority is itself limited by the Constitution, which allows democratic influences in some areas. That means that, in effect, the U.S. can sometimes resemble a democracy but is indeed a republic. Sometimes the undemocratic aspects of our society are less obvious than the democratic aspects. For instance, we do not see a vote to censor an unpopular viewpoint, because that is Unconstitutional. However, we do see votes for president, which are much more obvious and get much more media attention. Something being prevented (by our republic) is much less obvious than something that actually happens.
The post I responded to said this:
The strength of a democracy iies in the priciples behind it and not in the structurse established.
That rejects the republican principles on which this country was founded in favor of democracy. The "structure established" is our republic, which, among other things, prevents the majority from censoring the minority.
Please see my other posts in this thread for a more thorough argument that we do not live in a democracy, but instead in a republic that employs some principles of democracy.
America is a Democracy. The legislature is answerable to the people.
And the judiciary isn't. So it's not really a democracy, is it? It has some democratic influences, but clearly a large part of the government is undemocratic, and the rest is indirectly democratic.
So please, fuck off.
Likewise.
The decision, IMO, goes right against the 5th amendment that says: ... nor shall private property be taken for public use ...
I agree wholeheartedly. The protections of private property in the 5th and 14th Amendments are extended to all localities in the U.S.
The SC said that the increased local taxes provided by taking people's land was a "public purpose". Anything can be argued to be a "public purpose" but the Constitutional standard is "public use". That means you can't use eminent domain to transfer the land from one private party to another.
In effect, the SCOTUS completely removed that provision in the 5th Amendment, which is entirely Unconstitutional. That provision has meaning, and obviously the liberals on the SC didn't like the meaning. So much for the facade of the liberals standing up for the little guy.
It is not just the limits on majority rule that make us undemocratic.
Judges (Federal) and justices are not government by the people. They are appointed, which is in direct conflict of your definition of democracy. An appointment is a government by the government. If you include multiple levels of indirection in your definition of "democracy", the word simply has no meaning to you and any government is "democratic".
Clearly, we employ principles inspired by democracy. I acknowledged that. But equally clearly, we are a republic, first and foremost. The specifics of our republic are based on varying degrees of democratic influence for various government positions. Consider that it is only recently that even Senators are elected directly.
PS: Don't forget about an entire branch of the government (the judiciary). It makes you sound like an idiot.
Not all judges are elected, but most are not "appointed for life."
Federal judges are appointed for life. There are more than 9 federal judges in the U.S. Are you seriously that dense?
Judges and Justices are subjected to a certain level of democratic influence, like anything else. And I suppose that you could also say that even a federal judge can be impeached. But what I was talking about was judges who make precedent law without much in the way of checks and balances. The guy on the bench hearing your case for the speeding ticket is unlikely to change the way millions of Americans live with the stroke of a pen. A federal judge might.
But you didn't really care to argue with my point. Instead you leaped at the chance to try to correct my generalization, with exceptions to the rule that are totally irrelevent to my point. If you just wanted to set the record straight, make a quick, courteous, informative correction and move on. No need for name calling. You didn't even provide the information you claimed that I didn't know. Which judges are appointed for life, and which aren't? What is the process for removing each type of judge? What is the process for selecting each judge, and how much role does democracy play in that selection?
Our "Democratic Republic" is a republic, and not a democracy. The post I responded to suggested that democracy was the most important aspect of this country, more so than the structure of the laws. That is the antithesis of a republic.
A republic has certain important restrictions on the power of the majority. For instance, many actions require a supermajority. A democratic republic brings some of the benefits of democracy, but the restrictions are designed to prevent problems that have existed in ancient democracies. Democracy is not a new concept.
Our particular republic is unique because of the types of restrictions on the democracy, like preventing the majority from censoring the minority. "Democratic Republic" is merely the name we like to give to our particular republic because it employs some principles of democracy, like electing representatives in government, and a chance to indirectly elect the president. But clearly it rejects the overall democratic philosophy that the majority is right. The most obvious examples that our republic rejects democracy is that judges are not democratically elected, and the accused are not democratically convicted.
Sometimes the law is ambiguous or conflicting. In that case, the judge should be as conservative as possible, by which I mean the judge should avoid any decisions that change the status quo. He should then issue in his opinion a criticism of the conflicting laws, and suggest that they be clarified.
Of course, if one law supercedes another, the greater law holds.
That is an interesting case. No doubt, if an Act of Congress is Unconstitutional, I believe that the SCOTUS should indeed recognize the higher power of the Constitution, and declare the conflicting Act (or perhaps the conflicting portions of the Act) void.
That being said, the SCOTUS is not the final arbiter of the Constitution. Some of their recent decisions show that 9 people are not responsible enough to hold that position. One recent example is the Kelo decision (Oh, and did you notice that the people on the correct side of the decision are all the conservatives?). I suppose in the case where the SCOTUS is in direct conflict with the Constitution itself, it is the duty of Congress to impeach the offending members of the Court.
Unfortunately, there aren't any nice ways to correct the mistakes of a judge, especially when they sit on the Supreme Court. It takes a long time for those decisions to be overturned, and for decisions like Kelo, it may never happen.