Дорогие друзья, переводы (и адаптации) моих статей на русский теперь будут доступны на habrahabr.ru, а потому милости прошу.

Found a comprehensive research called “Comparison of different SQL implementations”.

Great work done.

slicer

Preface

November, 4th. Release Candidate 1 of Database Designer for PostgreSQL 1.2.9 become available. Among three changes comparing to the last beta there is the one which attracts attention — “Execute Script In Single Transaction (Alt + F9)” functionality added. World community shocked.

“What means added? We thought it always was executed in single transaction…” – resounded from all sides.

November, 14th. MicroOLAP Headquarters. Explanatory mission entrusted to the best agent… Me. ;)

pgadmin-multiple-set

pgAdmin shows the last result set

Right now there is no any opportunity to remember who got the idea about script slicing in SQL Executor. The gist was — each returned result set must be displayed.

Have a look how pgAdmin handles multiple result sets. As you can see only the last is available while others are discarded (we may read about this on the Messages tab).

One more notice. Multiple statements in pgAdmin always executed in the single transaction context. This is not a miracle since PQsendQuery function from client library used.

By the way, the fact that PQsendQuery used give us a hope that someday pgAdmin will handle all result sets.

pgmdd-multiple-set

PgMDD shows all result sets in separate tabs

note Just for note, I’m not saying pgAdmin is a dinosaur or something. I like it a lot. This is “must have” tool for sure. I’m using it because of other GUI administration utility absence. :)

As you probably guessed PgMDD creates separate tab for each result set from the very first release.

There is one more important issue why script slicing was implemented. Database Designer is some kind of ideal world. You may use any names, any functions, any data types for model creating.

But real life is cruel. Generated script must work in any conditions even if some statements may fail, e.g. old server version, non-existent role, lack of privileges for some operations, object with the same name already exists etc. That’s why PgMDD’s SQL Executor should give the developer right of choice — abort execution or proceed anyway.

How it’s made

Let me one phrase before I begin: there is no any SQL parser library (or suite) on the market which suits even the basic needs (I mean PostgreSQL dialect of course). I guarantee this!

God is my witness, our team tried every 3rd party library we meet. Without success.

In Russian speaking IT folklore there is an adage “Переписать всё нахрен!”. Loose translation is “Rewrite all from scratch!”

OK, the moment of glory. We made it ourselves using the native PostgreSQL grammar. Yeah, bite me unbelievers!

Let’s omit technical details. I know nobody cares anyway. ;) Our parser is absolutely… no, I mean absolutely compatible with PostgreSQL. But with 8.3.x version. :) It’s just a matter of time to update it, but we missed the moment.

So we have two reasons to add “Execute in Single Transaction” functionality:

  • Ability to ROLLBACK all changes made by script in case of need
  • PgMDD parser cannot proceed with some PostgreSQL 8.4.x features

That’s all folks!

I wrote about on-line source highlighter already. Found another one which suits my needs either.

We (in MicroOLAP Technologies) just finished client libraries update for 8.4.1 version.

Quick facts:

  • Two packages were updated:
    • Deployment libraries shipped with PostgreSQL installation
    • Deployment libraries built with MinGW environment
  • Both packages are built against 8.4.1 version of PostgreSQL
  • Comparing to 8.3.6 version libpq.dll library shipped with PostgreSQL installation depends on 12 libraries now (were 9 in 8.3.6)
  • Dump and restore libraries for 8.3.x and 8.2.x PostgreSQL branches are included into “Deployment libraries built with MinGW environment” package
  • Included dump libraries (pg_dump-8.2.14.dll, pg_dump-8.3.8.dll) may be used with PaGoDump utility either

Enjoy!

Next Page »