[SQL] user defined functions in Java ?

2000-11-03 Thread Umashankar Kotturu

Hi,

I am a beginner in postgres.

a) I understand from postgres documentation that a user-defined function can 
be in sql or C language. Do any of you have an idea if such a function can 
be defined in Java ?

b) if some one has examples of code, can you please forward the same ?

Regards
Uma.


_
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.

Share information about yourself, create your own public profile at 
http://profiles.msn.com.




[SQL] Connecting to Postgres from Windows

2000-11-03 Thread Umashankar Kotturu

Hi

I am connecting to postgres in a java program running on windows 98.

a) I am running the postgres on linux with -i option
b) I am using the url as "jdbc:postgresql://:5432/testdb"

The program is unable to resolve the url? The same thing happens when 
executing the java code on the linux machine (same as that running 
postgres). However if I put 127.0.0.1 (or localhost) instead of 
, it resolves and works fine.

Any suggestions on what could be the problem ?

Regards
Uma.



_
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.

Share information about yourself, create your own public profile at 
http://profiles.msn.com.




Re: [SQL] Connecting to Postgres from Windows

2000-11-03 Thread Indraneel Majumdar

check your pg_hba.conf file for correct permissions. you need to have host
based authenticationenabled for the network/hosts from where you are
trying to connect.

HTH
\Indraneel

On Fri, 3 Nov 2000, Umashankar Kotturu wrote:

> Hi
> 
> I am connecting to postgres in a java program running on windows 98.
> 
> a) I am running the postgres on linux with -i option
> b) I am using the url as "jdbc:postgresql://:5432/testdb"
> 
> The program is unable to resolve the url? The same thing happens when 
> executing the java code on the linux machine (same as that running 
> postgres). However if I put 127.0.0.1 (or localhost) instead of 
> , it resolves and works fine.
> 
> Any suggestions on what could be the problem ?
> 
> Regards
> Uma.
> 

/.
# Indraneel Majumdar  ¡  E-mail: [EMAIL PROTECTED]  #
# Bioinformatics Unit (EMBNET node),  ¡  URL: http://scorpius.iwarp.com  #
# Centre for DNA Fingerprinting and Diagnostics, #
# Hyderabad, India - 500076  #
`/




[SQL] Urgent trigger problem.

2000-11-03 Thread Carolyn Lu Wong

I'm using V6.5.

I want to write trigger to update database transaction logs. I have
followed the examples, but have now run into some problems. I'm using
plpsql to create a function for the trigger.

I don't want to end up with very large transaction log tables and not
all fields from a table will go to the log, so i want to compare old
and new values of certain fields before adding transaction records. 

I get the following error when I try to create the trigger in my
database:

pgReadData() -- backend closed the channel unexpectedly.
This probably menas the backend terminated abnormally before or while
processing the request.
We have lost the connection to the backend, so further processing is
impossible.

Tom said that it seems to be a bug and asked for backtrace. The
problem is, after numerous tries, I'm still unable to generate a core
file from this crash.

I also find that running this script on another database (a new
database created with the particular table I'm working with) didn't
have this error! But after serveral modification to the function and
running the script a number of times on this test database, it crashed
with the same error. I did a 'vacuum' on this test db and tried to run
again, the db function and trigger can be dropped and re-created a
number of times before it crashes again.

Seeing it works after 'vacuum' the test database, I tried to run
vacuum on the development db, then tried to run the script, it failed
even at its 1st attempt!

Anyone has any idea?



[SQL] Subqueries in from clause

2000-11-03 Thread Pierre Habraken

It looks like if subqueries in from clause are not supported by
PostgreSQL. Am I right ? If yes, are there any plans to provide this
feature soon ?

I would like to use Postgres for teaching SQL as a replacement for a
well known commercial product which I find too heavy, too not open
source, too everything ! For this kind of usage I need most SQL92
features, at least for query expression.

Thanks for any information or advice about this topics.

Pierre
-- 

Pierre HABRAKEN - mailto:[EMAIL PROTECTED]
Tél: 04 76 82 72 48 - Fax: 04 76 82 72 87
IMAG-LSR BP72 38402 SAINT MARTIN D'HERES Cedex




Re: [SQL] Subqueries in from clause

2000-11-03 Thread Tom Lane

Pierre Habraken <[EMAIL PROTECTED]> writes:
> It looks like if subqueries in from clause are not supported by
> PostgreSQL. Am I right ? If yes, are there any plans to provide this
> feature soon ?

Already there in current sources for 7.1 ...

regards, tom lane



RE: [SQL] really need help

2000-11-03 Thread Schlobohm, Jack

Hi,

I would like to stop spending my work day deleting these messages. Is there
anybody out there responsible for this? Make it stop! Now!

Thanks

> -Original Message-
> From: Jie Liang [SMTP:[EMAIL PROTECTED]]
> Sent: Friday, November 03, 2000 1:35 PM
> To:   [EMAIL PROTECTED]; [EMAIL PROTECTED]
> Subject:  [SQL] need help urgent
> 
> Hi,
> 
> Is anybody have experience about core dump?
> We have some scripts have been used for a long time, however, recently,
> they seem to have some problems,
> the message I got:
> 
> SSELECT priority from priority where source=lower('questionable')
> Total insert into preunchecked: 1
> Segmentation fault - core dumped
> Segmentation fault - core dumped
> 
> This script has been used for a few monthes, no problem.
> 
> I checked my pgsql.log, I saw:
> 
> Nov  3 00:58:45 wipeout postgres[1638]: query: INSERT INTO
> source(id,source) SELECT id,'questionable' from
> preunchecked WHERE insertdate>= '2000-11
> -03 00:58:45-08'
> Nov  3 00:58:46 wipeout postgres[1642]: query: SELECT version()
> Nov  3 00:58:46 wipeout postgres[1642]: query: begin
> Nov  3 00:58:46 wipeout postgres[1642]: ProcessUtility: begin
> Nov  3 00:58:46 wipeout postgres[1642]: query: set transaction isolation
> level serializable
> Nov  3 00:58:46 wipeout postgres[1642]: ProcessUtility: set transaction
> isolation level serializable
> Nov  3 00:58:46 wipeout postgres[1642]: query: SELECT oid from
> pg_database where datname = 'template1'
> Nov  3 00:58:46 wipeout postgres[1642]: query: SELECT pg_type.oid,
> typowner, typname, typlen, typprtlen, typinput, typoutput, typreceive,
> typsend, typelem, typdeli
> m, typdefault, typrelid, typbyval, usename from pg_type, pg_user where
> typowner = usesysid
> Nov  3 00:58:46 wipeout postgres[1642]: query: SELECT pg_proc.oid,
> proname, prolang, pronargs, prorettype, proretset, proargtypes, prosrc,
> probin, usename from pg_
> proc, pg_user where pg_proc.oid > '17216'::oid and proowner = usesysid
> Nov  3 00:58:46 wipeout postgres[1642]: query: SELECT pg_aggregate.oid,
> aggname, aggtransfn1, aggtransfn2, aggfinalfn, aggtranstype1,
> aggbasetype, aggtranstype2, a
> gginitval1, agginitval2, usename from pg_aggregate, pg_user where
> aggowner = usesysid
> 
> 
> 
> We have no script to open a new session[1642],  how this happen? how I
> to prevent this??
> 
> 
> Thanks!
> 
> 
> --
> Jie LIANG
> 
> Internet Products Inc.
> 
> 10350 Science Center Drive
> Suite 100, San Diego, CA 92121
> Office:(858)320-4873
> 
> [EMAIL PROTECTED]
> www.ipinc.com
> 
> 
> 

 application/ms-tnef


[SQL] need help urgent

2000-11-03 Thread Jie Liang

Hi,

Is anybody have experience about core dump?
We have some scripts have been used for a long time, however, recently,
they seem to have some problems,
the message I got:

SSELECT priority from priority where source=lower('questionable')
Total insert into preunchecked: 1
Segmentation fault - core dumped
Segmentation fault - core dumped

This script has been used for a few monthes, no problem.

I checked my pgsql.log, I saw:

Nov  3 00:58:45 wipeout postgres[1638]: query: INSERT INTO
source(id,source) SELECT id,'questionable' from
preunchecked WHERE insertdate>= '2000-11
-03 00:58:45-08'
Nov  3 00:58:46 wipeout postgres[1642]: query: SELECT version()
Nov  3 00:58:46 wipeout postgres[1642]: query: begin
Nov  3 00:58:46 wipeout postgres[1642]: ProcessUtility: begin
Nov  3 00:58:46 wipeout postgres[1642]: query: set transaction isolation
level serializable
Nov  3 00:58:46 wipeout postgres[1642]: ProcessUtility: set transaction
isolation level serializable
Nov  3 00:58:46 wipeout postgres[1642]: query: SELECT oid from
pg_database where datname = 'template1'
Nov  3 00:58:46 wipeout postgres[1642]: query: SELECT pg_type.oid,
typowner, typname, typlen, typprtlen, typinput, typoutput, typreceive,
typsend, typelem, typdeli
m, typdefault, typrelid, typbyval, usename from pg_type, pg_user where
typowner = usesysid
Nov  3 00:58:46 wipeout postgres[1642]: query: SELECT pg_proc.oid,
proname, prolang, pronargs, prorettype, proretset, proargtypes, prosrc,
probin, usename from pg_
proc, pg_user where pg_proc.oid > '17216'::oid and proowner = usesysid
Nov  3 00:58:46 wipeout postgres[1642]: query: SELECT pg_aggregate.oid,
aggname, aggtransfn1, aggtransfn2, aggfinalfn, aggtranstype1,
aggbasetype, aggtranstype2, a
gginitval1, agginitval2, usename from pg_aggregate, pg_user where
aggowner = usesysid



We have no script to open a new session[1642],  how this happen? how I
to prevent this??


Thanks!


--
Jie LIANG

Internet Products Inc.

10350 Science Center Drive
Suite 100, San Diego, CA 92121
Office:(858)320-4873

[EMAIL PROTECTED]
www.ipinc.com