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 C461ED1CC9C for ; Tue, 24 Feb 2004 11:51:24 +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 90757-06 for ; Tue, 24 Feb 2004 07:51:24 -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 7C4EAD1CAE1 for ; Tue, 24 Feb 2004 07:51:20 -0400 (AST) Received: from india-core-1.cisco.com (64.104.129.221) by ind-iport-1.cisco.com with ESMTP; 24 Feb 2004 22:56:19 +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 i1OBp9WT006203; Tue, 24 Feb 2004 03:51:10 -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 RAA25674; Tue, 24 Feb 2004 17:19:19 +0530 (IST) Reply-To: From: "Sumita Biswas (sbiswas)" To: "'Tom Lane'" Cc: Subject: CURSORS - Please help urgent. Date: Tue, 24 Feb 2004 17:21:16 +0530 Organization: cisco systems Message-ID: <002701c3facc$83113040$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 Importance: Normal In-Reply-To: <20409.1077506948@sss.pgh.pa.us> X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4927.1200 X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200402/398 X-Sequence-Number: 17088 The follow code gives me Error: DECLARE CURSOR_GET_ALL_CONFERENCE_RECORDS CURSOR FOR Select ConferenceType,CallManagerId,ClusterId,DestConversationId,AppConfId,Fina lDestination FROM Tmp_Conference; OPEN CURSOR_GET_ALL_CONFERENCE_RECORDS; FETCH FROM CURSOR_GET_ALL_CONFERENCE_RECORDS INTO lv_ConfId, li_CallManagerId, lv_ClusterId, li_DestConversationId, lv_AppConfId, lv_FinalDestination; -- Close and de-allocate cursor CLOSE CURSOR_GET_ALL_CONFERENCE_RECORDS; Error is as follows: plpgsql: ERROR during compile of proc_conferencesummary near line 212 ERROR: syntax error at or near "OPEN" Please comment what can be wrong. 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