Re: Error Number in Function - Mailing list pgsql-sql

From Sumita Biswas
Subject Re: Error Number in Function
Date
Msg-id 001b01c3f9bd$d53dfb10$2a154d0a@apac.cisco.com
Whole thread Raw
In response to Re: Postgres DB  (Tom Lane <tgl@sss.pgh.pa.us>)
List 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 by date:

Previous
From: "Sumita Biswas"
Date:
Subject: Re: Postgres DB
Next
From: "Sumita Biswas"
Date:
Subject: DATEADD