FW: Implementation of SQLSTATE and SQLERRM variables

From: "Dinesh Pandey" <dpandey(at)secf(dot)com>
To: "'Pavel Stehule'" <stehule(at)kix(dot)fsv(dot)cvut(dot)cz>, <pgsql-patches(at)postgresql(dot)org>
Cc: "'Bruce Momjian'" <pgman(at)candle(dot)pha(dot)pa(dot)us>, "'Tom Lane'" <tgl(at)sss(dot)pgh(dot)pa(dot)us>, <neilc(at)samurai(dot)com>
Subject: FW: Implementation of SQLSTATE and SQLERRM variables
Date: 2005-04-20 06:21:33
Message-ID: 20050420062426.3E803539F7@svr1.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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 Content-Type Size
sqlstate.diff application/octet-stream 7.3 KB

Responses

Browse pgsql-patches by date

  From Date Subject
Next Message Simon Riggs 2005-04-20 08:27:51 Re: WIP XLog Switch
Previous Message Dinesh Pandey 2005-04-20 05:58:12 Re: Implementation of SQLSTATE and SQLERRM variables