CURSORS - Please help urgent.

Поиск
Список
Период
Сортировка
От Sumita Biswas (sbiswas)
Тема CURSORS - Please help urgent.
Дата
Msg-id 002701c3facc$83113040$2a154d0a@apac.cisco.com
обсуждение исходный текст
Ответ на Re: Postgres DB  (Tom Lane <tgl@sss.pgh.pa.us>)
Список 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 по дате отправления:

Предыдущее
От: "Sumita Biswas (sbiswas)"
Дата:
Сообщение: Unicode Support
Следующее
От: Jonathan Gardner
Дата:
Сообщение: Re: [HACKERS] Materialized View Summary