Re: Error Number in Function

Поиск
Список
Период
Сортировка
От Sumita Biswas
Тема Re: Error Number in Function
Дата
Msg-id 001b01c3f9bd$d53dfb10$2a154d0a@apac.cisco.com
обсуждение исходный текст
Ответ на Re: Postgres DB  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-sql
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" <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"
Дата:
Сообщение: Re: Postgres DB
Следующее
От: "Sumita Biswas"
Дата:
Сообщение: DATEADD