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