Skip site navigation (1) Skip section navigation (2)

Re: Error Number in Function

From: "Sumita Biswas" <sbiswas(at)cisco(dot)com>
To: "'Tom Lane'" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: <pgsql-sql(at)postgresql(dot)org>
Subject: Re: Error Number in Function
Date: 2004-02-23 03:33:41
Message-ID: 001b01c3f9bd$d53dfb10$ (view raw, whole thread or download thread mbox)
Lists: 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?


-----Original Message-----
From: Tom Lane [mailto:tgl(at)sss(dot)pgh(dot)pa(dot)us] 
Sent: Monday, February 23, 2004 8:59 AM
To: Sumita Biswas
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: Postgres DB 

"Sumita Biswas" <sbiswas(at)cisco(dot)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

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

In response to

pgsql-sql by date

Next:From: Christopher BrowneDate: 2004-02-23 04:07:13
Subject: Re: User defined types -- Social Security number...
Previous:From: Tom LaneDate: 2004-02-23 03:29:08
Subject: Re: Postgres DB

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group