Posts Tagged ‘bazy danych’

Suppressing CONTEXT lines in psql

2008-07-12 14:40:56 CEST | No Comments | Tags: , , , ,

CONTEXT messages are quite informative, but when you don’t need them, they can be real pain in the eyes:

psql:trees.sql:68: NOTICE: Adding tree structures to table public.testit.
CONTEXT: SQL function "add_tree_structure" statement 1
psql:trees.sql:68: NOTICE: Tree table will be public.testit_tree.
CONTEXT: SQL function "add_tree_structure" statement 1
psql:trees.sql:68: NOTICE: Primary key in source table is: id
CONTEXT: SQL function "add_tree_structure" statement 1

I mean – I know the context. I’m writing the sql file right now, how to disable it?

- MORE -

Waiting for 8.4 – timing on/off

2008-06-11 22:33:39 CEST | 7 Comments | Tags: , , , ,

Yes, finally! David Fetter wrote, and Heikki Linnakangas committed patch which adds on/off arguments to \timing:

- MORE -

Waiting for 8.4 – partial-match support in GIN, and sequence restart

2008-05-17 17:20:36 CEST | 1 Comment | Tags: , , , , , , ,

Today we have two interesting patches:

  • patch by Teodor Sigaev and Oleg Bartunov, and committed by Tom Lane, which adds interesting capability to GIN indexes
  • patch by Zoltan Boszormenyi, also committed by Tom, which adds “RESTART” option to ALTER SEQUENCE. With some interesting consequences

- MORE -

Waiting for 8.4 – CASE in pl/PgSQL

2008-05-16 11:54:27 CEST | 4 Comments | Tags: , , , ,

Another patch from Pavel Stehule – committed by Tom Lane. This patch adds CASE construction to pl/PgSQL:

- MORE -

Waiting for 8.4 – function stats

2008-05-15 17:33:36 CEST | 4 Comments | Tags: , , , , , , ,

Today another great patch, committed by Tom Lane. This patch was written by Martin Pihlak (with some edits by Tom).

- MORE -

Waiting for 8.4 – pl/PgSQL RAISE

2008-05-14 18:01:20 CEST | 3 Comments | Tags: , , , ,

Today we have one new feature – extension of plpgsql’s RAISE command.

- MORE -

Prepared statements gotcha

2008-05-10 21:09:50 CEST | 9 Comments | Tags: , , , , ,

Friend from my previous employer told me that plans of execution of prepared statement, and the same statement run “as it” are different.

Well, I checked and this is what I found (it’s not shocking, it’s actually quite obvious, but You have to think about it for a while to “get it”).

- MORE -

Waiting for 8.4 – psql vs. tabs + wrapped output

2008-05-09 19:12:21 CEST | No Comments | Tags: , , , , ,

Today I will describe 2 new patches which modify psql:

- MORE -

MySQL’s timestamp in PostgreSQL

2008-05-08 17:16:43 CEST | 6 Comments | Tags: , , , , , ,

MySQL has this nifty/annoying feature/bug of special data type “TIMESTAMP”. It is like a DATETIME, but it gets automatically updated whenever you modify the row.

I’ll try to add the same feature to PostgreSQL.

- MORE -

“ERROR: operator does not exist: integer = text” how to fix it?

2008-05-05 13:11:31 CEST | 13 Comments | Tags: , , , ,

PostgreSQL 8.3 brought us many great new features. Among them were concurrent autovacuum, enums, tsearch in core.

On of the changes though made a lot of people dislike 8.3. It was removal of implicit casts.

- MORE -