X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 9D49CD1BA77 for ; Mon, 23 Feb 2004 03:33:49 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 37397-02 for ; Sun, 22 Feb 2004 23:33:47 -0400 (AST) Received: from ind-iport-1.cisco.com (ind-iport-1-sec.cisco.com [64.104.129.9]) by svr1.postgresql.org (Postfix) with ESMTP id 68CE8D1BA68 for ; Sun, 22 Feb 2004 23:33:41 -0400 (AST) Received: from india-core-1.cisco.com (64.104.129.221) by ind-iport-1.cisco.com with ESMTP; 23 Feb 2004 14:38:24 +0530 Received: from cisco.com (charminar.cisco.com [192.135.240.11]) by india-core-1.cisco.com (8.12.10/8.12.6) with ESMTP id i1N3XXWT024378; Sun, 22 Feb 2004 19:33:33 -0800 (PST) Received: from sbiswasw2k01 (dhcp-10-77-21-42.cisco.com [10.77.21.42]) by cisco.com (8.8.8-Cisco List Logging/8.8.8) with ESMTP id JAA27836; Mon, 23 Feb 2004 09:01:46 +0530 (IST) From: "Sumita Biswas" To: "'Tom Lane'" Cc: Subject: Re: Error Number in Function Date: Mon, 23 Feb 2004 09:03:41 +0530 Message-ID: <001b01c3f9bd$d53dfb10$2a154d0a@apac.cisco.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.4024 In-reply-to: <20409.1077506948@sss.pgh.pa.us> X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4927.1200 Importance: Normal X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200402/382 X-Sequence-Number: 17072 Thanks for the clarification Tom. I have one more query. Is there a way to get the error number for the last Transact-SQL statement executed in a Function in postgresql? In MSSQL Stored Procedures we used @@ERROR variable to get the same. Is there an equivalent in postgresql functions? Regards, Sumita -----Original Message----- From: Tom Lane [mailto:tgl@sss.pgh.pa.us] Sent: Monday, February 23, 2004 8:59 AM To: Sumita Biswas Cc: pgsql-sql@postgresql.org Subject: Re: Postgres DB "Sumita Biswas" writes: > But when I type the command "psql" and don't specify a DB name, it > says > that: > psql: FATAL: Database "postgres" does not exist in the system catalog. Yes, because psql's default behavior is to try to connect to the DB with the same name as your user name. That doesn't mean that such a DB is guaranteed to exist, or even that anything is going to try to create it for you. It's just a default behavior that people have found handy. regards, tom lane