Jump to content

Archive for the ‘postgresql’ Category


Oracle/Sun not off to a good start with open source

Thursday, July 29th, 2010 by Jim Mlodgenski

Hot off the heels of Oracle stopping the PostgreSQL build farm servers for Solaris, Oracle released an automatic update for Java that rebrands the company name from Sun to Oracle which had the cascading effect of breaking Eclipse.

While I don’t think this is some sort of coordinated plan by Larry to bring down open source in general, I think this is indicative of the pain of integrating Sun in to Oracle and we can expect more of this in the future. On the positive side, I think the reactions by the PostgreSQL and Eclipse communities really highlight the power of the open source process. In both cases, the communities had solutions quickly in the wake of the mess created by Oracle.

Oracle/Sun not off to a good start with open source



Scala PostgreSQL Access

Thursday, July 8th, 2010 by Jim Mlodgenski

Recently, I’ve been digging into Scala to understand how PostgreSQL would integrate inside of Scala code. Scala is an interesting language which runs on the JVM like Java but eliminates much of the Java boiler plate code increasing the productivity of developers. With many of the knowledgeable Java programmers advocating Scala and large success stories like Twitter becoming more common, there is a possibility that one day Scala will unseat Java and the dominate enterprise programming language in the future. Given this possibility, it is encouraging that PostgreSQL is respected in the Scala community, but unfortunately, what I’m finding, database persistence in general is still appears to be immature inside of Scala. There is an early module called DBC that attempts to provide database connectivity, but this initial attempt was lacking. Below is an example of running a simple query which I find very awkward:

object MainDBC {

  import scala.dbc._
  import scala.dbc.Syntax._
  import syntax.Statement._

  def main(args: Array[String]): Unit = {
    val db = database("jdbc:postgresql://localhost/scala","postgres","password")
    val res = db.executeStatement {
      (select fields (("pgbench_tellers.tid" of integer)
                  and ("pgbench_tellers.bid" of integer)
                  and ("pgbench_branches.bbalance" of integer))
         from "pgbench_tellers, pgbench_branches"
        where "pgbench_tellers.bid = pgbench_branches.bid")
    }

    println(" tid   bid   bbalance")
    println("----- ----- ----------")
    for(val i <- res) {
      for(val f <- i.fields) {
        val r = f.content.sqlString
        print(r + "      ".dropRight(r.length))
      }
      println()
    }
  }
}

There are a number of object layers available that may be much easier to use, but the nice thing about Scala running on the JVM is that you can leverage the low level JDBC interface and eliminate much of the awkwardness. Below is an example of the same query but using JDBC.

object MainJDBC {

  import java.sql.{Connection, DriverManager, ResultSet}

  def main(args: Array[String]): Unit = {
    classOf[org.postgresql.Driver]
    val db = DriverManager.getConnection("jdbc:postgresql://localhost/scala","postgres","password")
    val st = db.createStatement

    val res = st.executeQuery(
               "SELECT pgbench_tellers.tid, pgbench_tellers.bid, pgbench_branches.bbalance" +
               "  FROM pgbench_tellers, pgbench_branches " +
               " WHERE pgbench_tellers.bid = pgbench_branches.bid")

    println(" tid   bid   bbalance")
    println("----- ----- ----------")
    while (res.next) {
        for(val i <- 1 to res.getMetaData.getColumnCount) {
          val r = res.getInt(i).toString
          print(r + "      ".dropRight(r.length))
        }
        println
    }
    db.close
  }
}
Scala PostgreSQL Access



Postgres 9.1 – Release Theme

Thursday, April 1st, 2010 by Dave Page

Following a great deal of discussion, I’m pleased to announce that the PostgreSQL Core team has decided that the major theme for the 9.1 release, due in 2011, will be ‘NoSQL’.

There is a growing trend towards NoSQL databases, with major sites like Twitter and Facebook utilising them extensively. NoSQL databases often include multi-master replication, clustering and failover features that have long been requested in PostgresSQL, but have been extremely difficult to implement with SQL which has prevented us from advancing Postgree in the way that we’d like.
To address this, the intention is to remove SQL support from Postgres, and replace it with a language called ‘QUEL’. This will provide us with the flexibility we need to implement the features of modern NoSQL databases. With no SQL support there will obviously be some differences in the query syntax that must be used to access your data. For example, the query:
select (e.salary/ (e.age – 18)) as comp from employee as e where e.name = “Jones”
would be rewritten as:
range of e is employee retrieve (comp = e.salary/ (e.age – 18)) where e.name = “Jones”
Aggregate syntax in QUEL is particularly powerful. For example, the query:
select dept,
avg(salary) as avg_salary,
sum(salary) as tot_salary
from
employees
group by
dept
may be written as:
range of e is employee
retrieve (e.dept,
avg_salary = avg(e.salary by e.dept),
tot_salary = sum(e.salary by e.dept)
)
Note that the grouped column can be specified for each individual aggregate.
We will be producing a comprehensive guide to the QUEL syntax to aid with application migration. We appreciate the difficulty that this change may cause some users, but feel we must embrace the NoSQL philosophy in order to remain “The world’s most advanced Open Source
database”
“There’s no question that, at 21 years old, the SQL standard is past its prime,” said core developer and standards expert Peter Eisentraut. “It’s time for us to switch to something fresher. I personally would have preferred XSLT, but QUEL is almost as good.”
Project committer Heikki Linnakangas added: “By replacing SQL with QUEL not only will will be able to add new features to Postgres that were previously too difficult, but we’ll also increase user loyalty as it’ll be much harder for them to change to a different, SQL-based
database. That’ll be pretty cool.”
You may also notice that without SQL, the project name is somewhat misleading. To address that, the project name will be changed to ‘PostgreQUEL’ with the 9.1 release. We expect this will also put an end to the periodic debates on changing the project name.
Dave Page
On behalf of the PostgreSQL Core Team
Postgres 9.1 – Release Theme



PG East: Hotel

Tuesday, March 30th, 2010 by Bruce Momjian

PG East was an unqualified success, as others have already
blogged
about. This conference might signal a change in the style for dedicated Postgres conferences. Postgres-specific conferences started only
a few years ago, mostly at universities. I was one of the early proponents of having conferences at universities after seeing the success
of FOSDEM. I felt the low admission cost made possible with inexpensive university facilities was
critical in attracting the mostly-volunteer Postgres developers to the conference.

I am ready to rethink that suggestion having attended PG East. The conference cost only USD $125, and many things were definitely easier
having the event in a hotel:

  • Informal conversations
  • Attracting business users to the show
  • Group excursions
  • Laptop and bag storage

Continue Reading »

PG East: Hotel



PG East: Slides

Tuesday, March 30th, 2010 by Bruce Momjian

My slides from PG East are now online, and I will be giving a
webcast of that presentation in late April. The presentation covers the new
Postgres 9.0 features of hot standby and streaming replication: how they work, how to configure them, and their current limitations. The
presentation also includes a live demonstration of setting up these features.

PG East: Slides



Speaking in New York City

Tuesday, March 30th, 2010 by Bruce Momjian

I am speaking at New York PostgreSQL Meetup Group on April 20th about Postgres
replication solutions. This will be a much larger group than
previous New York City Postgres meetings; 13 people have already registered.

Speaking in New York City



Getting ready for PG East

Tuesday, March 23rd, 2010 by Dave Page

After a stressful few weeks keeping a close eye on the BA cabin crew strike, it seems that my flight is still scheduled so I will be able to get to Philadelphia for PG East 2010 without having to use my insanely expensive refundable backup ticket with US Airways.

This years conference is in a new format, spread over three days with a fourth day of tutorials on the schedule, all at the rather nice Radisson Plaza-Warwick Hotel in Philly, courtesy of my boss’ budget here at EnterpriseDB (OK, I’m done with the shameless company plugs :-p ). The schedule includes a good mix of topics with varying levels of technical detail for geeks through IT/IS management.
I’ll be presenting a new talk in which I’ll describe the infrastructure behind postgresql.org, and how it’s managed. If you’ve not been closely involved in a large Open Source project, you may be surprised at just how much there is – certainly far more than a webserver and mailing lists which are probably the most visible things.
Anyway – I’m speaking on Thursday, so if you can get to Philly, it’d be great to see you there.

Getting ready for PG East



9.0 Release Notes Ready

Saturday, March 20th, 2010 by Bruce Momjian

I have completed the Postgres 9.0 release notes and you can view them
online. There will, of course, be many adjustments to the release
notes before 9.0 final.

9.0 Release Notes Ready



PG East: What to Expect

Monday, March 15th, 2010 by Bruce Momjian

The upcoming PG East Conference is in my home town, Philadelphia. The
conference promises to be a new generation of Postgres conferences, and I want to highlight some of the changes that attendees can expect.

First, as I mentioned before, the
hotel venue for this conference is much nicer than typical Postgres conferences. Also, it is
located in an area of Philadelphia that is packed with great restaurants and shops.

Continue Reading »

PG East: What to Expect



9.0 Release Notes Creation

Monday, March 15th, 2010 by Bruce Momjian

I have started preparing the release notes for Postgres 9.0. I went into
great detail last year about how the release notes are created, so I
will not bore you with the mind-numbing details this time. I should be ready with the first draft in a week or two.

Update: I have completed stage #3. 2010-03-16 03:33:20 GMT

Continue Reading »

9.0 Release Notes Creation



Connect
About the Bloggers
Search

You are currently browsing the archives for the postgresql category.