X-Original-To: pgsql-interfaces-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 68E88D1B373 for ; Wed, 9 Jun 2004 19:35:30 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 82566-01 for ; Wed, 9 Jun 2004 22:35:32 +0000 (GMT) Received: from web40604.mail.yahoo.com (web40604.mail.yahoo.com [66.218.78.141]) by svr1.postgresql.org (Postfix) with SMTP id EC535D1B360 for ; Wed, 9 Jun 2004 19:35:27 -0300 (ADT) Message-ID: <20040609223530.6435.qmail@web40604.mail.yahoo.com> Received: from [135.214.154.104] by web40604.mail.yahoo.com via HTTP; Wed, 09 Jun 2004 15:35:30 PDT Date: Wed, 9 Jun 2004 15:35:30 -0700 (PDT) From: Brett Schwarz Subject: Re: A doubt in pgtcl To: Senthil , scrappy@hub.org Cc: pgsql-interfaces@postgresql.org In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=1.2 tagged_above=0.0 required=5.0 tests=DEAR_SOMETHING X-Spam-Level: * X-Archive-Number: 200406/22 X-Sequence-Number: 4950 [Hummmm, wonder why it didn't have pgsql-interfaces in the reply-to] You can use pg_result to get any error info. For example: set han [pg_connect ...] set result [pg_exec $han "SELECT * FROM bogus_table"] set stat [pg_result $result -status] if {$stat ne "PGRES_TUPLES_OK"} { puts "GOT ERROR: [pg_result $result -error]" } HTH, --brett --- Senthil wrote: > Dear Sir, > I have just started to program in pgtcl.I have to > write a procedure for > connecting to a table and fetching records and > inserting them.What should > I do to catch the error conditions?The postmaster > runs in a separate > terminal and Tcl in another one.The errors may be > non existing table > name,field name or errors like query fetching many > rows as result.Please > give me a solution for this problem.Thanking you. > > Yours truly, > Senthil J > > > ---------------------------(end of > broadcast)--------------------------- > TIP 5: Have you checked our extensive FAQ? > > http://www.postgresql.org/docs/faqs/FAQ.html __________________________________ Do you Yahoo!? Friends. Fun. Try the all-new Yahoo! Messenger. http://messenger.yahoo.com/