I have Postgres 8.0.1 on Solaris 9 Sparc machine running in
"usr/local/pgsql" directory.

I am trying to apply  "sqlstate.diff" patch for SQLERRM and SQLSTATE for

1. I have copied "sqlstate.diff" in
"postgresql-8.0.1.old/src/pl/plpgsql/src" directory.
2. Executing command:
        patch -p4 < sqlstate.diff

Now it is asking for " File to patch:", here I am giving "gram.y" (I don't
know what it should be). After this it is giving the following error.

bash-2.03# patch -p4 < sqlstate.diff
  Looks like a context diff to me...
File to patch: gram.y
Hunk #3 failed at line 244.
Malformed patch at line 93:
patch: Line must begin with '+ ', '  ', or '! '.

Kindly let me know what's wrong?

Please help me how to apply this patch.

Dinesh Pandey

-----Original Message-----
Subject: [PATCHES] Implementation of SQLSTATE and SQLERRM variables


I updated patch to last changes plpgsql code. Patch contains changes for 
gram.y, pl_exec.c, plpgsql.h, regress/sql/plpgsql.sql and 
regress/output/plpgsql.out. I can't to write documenation, my english is 

This patch is implementation of variables SQLERRM and SQLSTATE for plpgsql 
language. Variable SQLSTATE contains five chars PostgreSQL Error Code, 
SQLERRM contains relevant message last catched exception. All variables 
are attached to plpgsql_block and have local scope. Default values are 
'00000' for SQLSTATE and 'Sucessful completion' for SQLERRM. 

Best regards
Pavel Stehule

Attachment: sqlstate.diff
Description: Binary data

---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?


Reply via email to