pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Sumita Biswas <sbiswas@cisco.com>
To: 'Tom Lane' <tgl@sss.pgh.pa.us>
Cc: pgsql-sql@postgresql.org
Subject: Re: Error Number in Function
Date: Mon, 23 Feb 2004 09:03:41 +0530
Message-ID: <001b01c3f9bd$d53dfb10$2a154d0a@apac.cisco.com> (raw)
In-Reply-To: <20409.1077506948@sss.pgh.pa.us>

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




Message-ID: <001b01c3f9bd$d53dfb10$2a154d0a@apac.cisco.com>
Permalink:  ../001b01c3f9bd$d53dfb10$2a154d0a@apac.cisco.com/
Also on:    postgresql.org/message-id/001b01c3f9bd$d53dfb10$2a154d0a@apac.cisco.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: sbiswas@cisco.com, tgl@sss.pgh.pa.us
  Subject: Re: Error Number in Function
  In-Reply-To: <001b01c3f9bd$d53dfb10$2a154d0a@apac.cisco.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox