FW: Implementation of SQLSTATE and SQLERRM variables - Mailing list pgsql-patches

From Dinesh Pandey
Subject FW: Implementation of SQLSTATE and SQLERRM variables
Date
Msg-id 20050420062426.3E803539F7@svr1.postgresql.org
Whole thread Raw
Responses Re: FW: Implementation of SQLSTATE and SQLERRM variables
List pgsql-patches
I have Postgres 8.0.1 on Solaris 9 Sparc machine running in
"usr/local/pgsql" directory and my source is in
"postgresql-8.0.1/src/pl/plpgsql/src" directory.

In "sqlstate.diff" file it is looking
" diff -c -r pgsql.old/src/pl/plpgsql/src/gram.y
pgsql/src/pl/plpgsql/src/gram.y"
checking diff between 2 directories "pgsql.old/src" and "pgsql/src".

Should I have to also copy Postgres source in 2 directories as
"postgresql-8.0.1/src" and "postgresql-8.0.1.old/src"???? If it is, so where
to run this patch?

Dinesh
-------------

Hi,

I have Postgres 8.0.1 on Solaris 9 Sparc machine running in
"usr/local/pgsql" directory  and my source is in
"postgresql-8.0.1/src/pl/plpgsql/src" directory.

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

1. I have copied "sqlstate.diff" in "postgresql-8.0.1/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 '! '.
bash-2.03#
bash-2.03#


Kindly let me know what's wrong?

Please help me how to apply this patch.


Thanks
Dinesh Pandey

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

Hello,

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
terrible.

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

pgsql-patches by date:

Previous
From: "Dinesh Pandey"
Date:
Subject: Re: Implementation of SQLSTATE and SQLERRM variables
Next
From: Simon Riggs
Date:
Subject: Re: WIP XLog Switch