|
|
Browse by Tags
All Tags » PostgreSql » Agile-learning (RSS)
Sorry, but there are no more tags available to filter with.
-
We shall reproduce a serialization failure and see SERIALIZABLE isolation level enforces data integrity. Prerequisites We shall need the following test data: CREATE TABLE Carpools ( Car_Name VARCHAR NOT NULL, Passenger VARCHAR NOT NULL ); INSERT INTO Read More...
|
-
In this post we shall run some examples under REPEATABLE READ, and see how they behave differently. Setting up test data On SQL Server, run the following: CREATE TABLE Tickets ( ID INT NOT NULL, Problem VARCHAR ( 100 ) NOT NULL, SpaceFiller CHAR ( 200 Read More...
|
-
As we have just discussed, READ COMMITTED isolation level behaves very much like Sql Server's READ_COMMITTED_SNAPSHOT. As such, we need to be very careful with data integrity - lots of code that just works on Sql Server under its default isolation level, Read More...
|
-
Because of multi-valued concurrency control aka MVCC, there are many differences in queries' behavior with different isolation levels. Before running examples, let us set up test data. Setting up test data The following script sets up the data we shall Read More...
|
-
PostgreSql has simple and consistent error handling, which can be roughly explained in Sql Server terms as follows: XACT_ABORT is Always ON. In other words, error handling in PostgreSql has substantially less features, but it does have all the features Read More...
|
-
UPDATE...FROM command on PostgreSql may raise no errors, but produce completely different results. Later I shall provide a repro, but first let us briefly refresh how UPDATE...FROM works on Sql Server. UPDATE...FROM on SQL Server ignores ambiguity We Read More...
|
-
All SQL Server queries using TOP and/or APPLY need to be changed - PostgreSql uses completely different syntax. Replacing TOP with LIMIT The following script shows how to do that: CREATE TEMP TABLE Runs ( State_Code VARCHAR , Run_Date DATE , Distance Read More...
|
-
Constraints in PostgreSql are implemented somewhat differently. To use them efficiently, there are quite a few details we need to be aware of. NULLs and uniqueness In PostgreSql, unique constraints allow multiple NULLs. This behavior is ANSI standard. Read More...
|
-
PostgreSql 9.3 allows us to declare parameter types to match column types, aka Copying Types. Also it allows us to omit the length of VARCHAR fields, without any performance penalty. These two features make PostgreSql a great back end for agile development, Read More...
|
-
PostgreSql features multi-version concurrency control aka MVCC. To implement MVCC, old versions of rows are stored right in the same table, and this is very different from what SQL Server does, and it leads to some very interesting consequences. Let us Read More...
|
-
Functions in PL/PgSql can be overloaded, which is very different from T-SQL. Demonstrating overloading For example, the second CREATE FUNCTION in the following script does not replace the first function - it creates a second one: CREATE OR REPLACE FUNCTION Read More...
|
-
In this post we shall start loading data in bulk. For better performance of inserts, we shall load data into a table without constraints and indexes. This sounds familiar. There is a bulk copy utility, and it is very easy to invoke from C#. The following Read More...
|
-
In this post we shall create a function that returns data, and invoke it from our C# client. There are no stored procedures in PostgreSql, only functions. This is different from T-SQL, but consistent with many other languages, such as C#. Creating a function Read More...
|
-
In this post we shall do some setup tasks, save a few rows of data from a .Net client to PostgreSql, and read it back. Setting up We have set up a virtual machine running Red Hat Linux, installed PostgreSql 9.3 on it, and made sure there is enough disk Read More...
|
-
In this series of blog posts we shall migrate some functionality from SQL Server to PostgreSql 9.2. The emphasis of these blog posts will be on what PostgreSql does differently from Sql Server - I assume that the reader has considerable knowledge of Sql Read More...
|
|
|
|
|