CURSORS - Please help urgent. - Mailing list pgsql-sql

From Sumita Biswas (sbiswas)
Subject CURSORS - Please help urgent.
Date
Msg-id 002701c3facc$83113040$2a154d0a@apac.cisco.com
Whole thread Raw
In response to Re: Postgres DB  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-sql

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



pgsql-sql by date:

Previous
From: "Sumita Biswas (sbiswas)"
Date:
Subject: Unicode Support
Next
From: Jonathan Gardner
Date:
Subject: Re: [HACKERS] Materialized View Summary