From: Sumita Biswas (sbiswas) <sbiswas@cisco.com>
To: 'Tom Lane' <tgl@sss.pgh.pa.us>
Cc: pgsql-sql@postgresql.org
Subject: CURSORS - Please help urgent.
Date: Tue, 24 Feb 2004 17:21:16 +0530
Message-ID: <002701c3facc$83113040$2a154d0a@apac.cisco.com> (raw)
In-Reply-To: <20409.1077506948@sss.pgh.pa.us>
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" <sbiswas@cisco.com> 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: sbiswas@cisco.com, tgl@sss.pgh.pa.us
Subject: Re: CURSORS - Please help urgent.
In-Reply-To: <002701c3facc$83113040$2a154d0a@apac.cisco.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox