pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Re: Postgres DB
5+ messages / 3 participants
[nested] [flat]

* Re: Postgres DB
@ 2004-02-23 02:54  Sumita Biswas <sbiswas@cisco.com>
  0 siblings, 1 reply; 5+ messages in thread

From: Sumita Biswas @ 2004-02-23 02:54 UTC (permalink / raw)
  To: 'Tom Lane' <tgl@sss.pgh.pa.us>; +Cc: pgsql-sql

Hi Tom,

I have read that template1 is the default DB that gets installed with
Postgres.
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.

This is the reason why I guessed that it expects the postgres DB be
installed by default.
Also earlier I have seen this DB get installed by itself, although we
have not created it.

Any answers to the above questions.

Regards,
Sumita

-----Original Message-----
From: Tom Lane [mailto:tgl@sss.pgh.pa.us] 
Sent: Saturday, February 21, 2004 9:41 PM
To: Sumita Biswas
Cc: pgsql-sql@postgresql.org
Subject: Re: [SQL] Function 


"Sumita Biswas" <sbiswas@cisco.com> writes:
> We installed postgres, but it did not install the default DB 
> "postgres".

The only DB that exists in a fresh installation is "template1".  If you
want to create a DB named "postgres", use the createdb script.

BTW, it's bad manners to ask a new question by following up an existing
unrelated thread.  Start a new thread with an appropriate subject line.
Otherwise you're wasting the time of the other people on the mailing
list, who are exactly the people who might answer your question.

			regards, tom lane




^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: Postgres DB
@ 2004-02-23 03:29  Tom Lane <tgl@sss.pgh.pa.us>
  parent: Sumita Biswas <sbiswas@cisco.com>
  0 siblings, 2 replies; 5+ messages in thread

From: Tom Lane @ 2004-02-23 03:29 UTC (permalink / raw)
  To: Sumita Biswas <sbiswas@cisco.com>; +Cc: pgsql-sql

"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



^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: Postgres DB
@ 2004-02-23 08:54  Sumita Biswas <sbiswas@cisco.com>
  parent: Tom Lane <tgl@sss.pgh.pa.us>
  1 sibling, 1 reply; 5+ messages in thread

From: Sumita Biswas @ 2004-02-23 08:54 UTC (permalink / raw)
  To: 'Tom Lane' <tgl@sss.pgh.pa.us>; +Cc: pgsql-sql

The following Query string , when executed does not give an Error, even
though the table Tbl_Billing_Data is not present.

QueryToPopulateTemp := ''INSERT INTO Tmp_Conference(ConferenceType,
CallManagerId, ClusterId, DestConversationId, ConnectDate,
FinalDestination)''+'' SELECT 2, Global_CallId_CallManagerId,
globalCallId_ClusterID, DestConversationID, StartDate = MIN
(Connect_Date), Final_Destination ''+'' FROM Tbl_Billing_Data'';

PERFORM QueryToPopulateTemp;

I some how feel that the Query is not getting executed at all, otherwise
its sure to give an error.

So can you please comment what would have gone wrong?

Regards,
Sumita





^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: Postgres DB
@ 2004-03-01 03:20  Michael Chaney <mdchaney@michaelchaney.com>
  parent: Sumita Biswas <sbiswas@cisco.com>
  0 siblings, 0 replies; 5+ messages in thread

From: Michael Chaney @ 2004-03-01 03:20 UTC (permalink / raw)
  To: pgsql-sql

On Mon, Feb 23, 2004 at 02:24:32PM +0530, Sumita Biswas wrote:
> The following Query string , when executed does not give an Error, even
> though the table Tbl_Billing_Data is not present.
> 
> QueryToPopulateTemp := ''INSERT INTO Tmp_Conference(ConferenceType,
> CallManagerId, ClusterId, DestConversationId, ConnectDate,
> FinalDestination)''+'' SELECT 2, Global_CallId_CallManagerId,
> globalCallId_ClusterID, DestConversationID, StartDate = MIN
> (Connect_Date), Final_Destination ''+'' FROM Tbl_Billing_Data'';

I had a situation where a subquery had an error in it, and the query
simply returned no rows instead of throwing an error.

It looks like it might well be a bug that we're experiencing, I just
haven't had time to chase it down.

Michael
-- 
Michael Darrin Chaney
mdchaney@michaelchaney.com
http://www.michaelchaney.com/



^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Postgres DB
@ 2004-04-23 18:10  Sumita Biswas <sbiswas@cisco.com>
  parent: Tom Lane <tgl@sss.pgh.pa.us>
  1 sibling, 0 replies; 5+ messages in thread

From: Sumita Biswas @ 2004-04-23 18:10 UTC (permalink / raw)
  To: 'Tom Lane' <tgl@sss.pgh.pa.us>; +Cc: pgsql-sql

Hi All,

Our application is using the Postgres 7.3.4-RH database that is packaged
with the AS3.0 for CCM. There is a variable type called refcursor that
is being used by CAR Functions in Postgres database. This variable works
fine when we execute the postgres Function from the database i.e through
psql. When we try to execute the Function from java code, it uses
pg73jdbc3.jar which is bundled with the Postgres 7.3.4, and
pg73jdbc3.jar does not support this variable type refcursor.

It works fine with pg74jdbc3.jar which comes along with Postgres 7.4.

Is this a bug?


Regards,
Sumita




^ permalink  raw  reply  [nested|flat] 5+ messages in thread


end of thread, other threads:[~2004-04-23 18:10 UTC | newest]

Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2004-02-23 02:54 Re: Postgres DB Sumita Biswas <sbiswas@cisco.com>
2004-02-23 03:29 ` Tom Lane <tgl@sss.pgh.pa.us>
2004-02-23 08:54   ` Sumita Biswas <sbiswas@cisco.com>
2004-03-01 03:20     ` Michael Chaney <mdchaney@michaelchaney.com>
2004-04-23 18:10   ` Sumita Biswas <sbiswas@cisco.com>

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