Обсуждение: error insert

Поиск
Список
Период
Сортировка

error insert

От
"abdelkrim"
Дата:
CREATE FUNCTION complex_in(opaque)  RETURNS complex  AS '/usr/local/pgsql/postgresql-6.4.2/src/tutorial/complex.so'
LANGUAGE'c';
 
NOTICE:  ProcedureCreate: type 'complex' is not yet defined
NOTICE:  ProcedureCreate: type 'complex' is not yet defined
CREATE


CREATE FUNCTION complex_out(opaque)  RETURNS opaque  AS '/usr/local/pgsql/postgresql-6.4.2/src/tutorial/complex.so'
LANGUAGE'c';
 
CREATE


CREATE TYPE complex (  internallength = 16,  input = complex_in,  output = complex_out
);
CREATE


CREATE TABLE test_complex ( a complex, b complex
);
CREATE


INSERT INTO test_complex VALUES ('(1.0, 2.5)', '(4.2, 3.55 )');
assertion "u.hdr.e_phentsize == sizeof(Elf_Phdr)" failed: file
"/usr/src/libexec/rtld-elf/map_object.c", line 118
pqReadData() -- backend closed the channel unexpectedly. This probably means the backend terminated abnormally before
orwhile
 
processing the request.
We have lost the connection to the backend, so further processing is
impossible.  Terminating.



in the root console:

assertion "u.hdr.e_phentsize == sizeof(Elf_Phdr)" failed: file
"/usr/src/libexec/rtld-elf/map_object.c", line 118



thank you for your help



JDBC Part II

От
"Adam H. Pendleton"
Дата:
Okay, I downloaded 6.5 postgreSQL and installed it.  Then I went into the
jdbc directory, set my PATH and CLASSPATH to point to jdk 1.1.7 and built
the interface.  Then I changed my PATH and CLASSPATH to point to JDK 1.2.  I
typed `make` again.  The build went fine.  Then I built my test program that
uses JDBC and ran it and got this error:

Exception caught: The postgresql.jar file does not contain the correct JDBC
classes for this JVM. Try rebuilding.
Exception thrown was java.lang.ClassNotFoundException:
postgresql.jdbc2.Connection

What did I do wrong?  When I compile and run the program with the JDK 1.1.7
it runs fine.

Adam



Re: [INTERFACES] JDBC Part II

От
Peter T Mount
Дата:
On Fri, 7 May 1999, Adam H. Pendleton wrote:

> Okay, I downloaded 6.5 postgreSQL and installed it.  Then I went into the
> jdbc directory, set my PATH and CLASSPATH to point to jdk 1.1.7 and built
> the interface.  Then I changed my PATH and CLASSPATH to point to JDK 1.2.  I
> typed `make` again.  The build went fine.  Then I built my test program that
> uses JDBC and ran it and got this error:
> 
> Exception caught: The postgresql.jar file does not contain the correct JDBC
> classes for this JVM. Try rebuilding.
> Exception thrown was java.lang.ClassNotFoundException:
> postgresql.jdbc2.Connection
> 
> What did I do wrong?  When I compile and run the program with the JDK 1.1.7
> it runs fine.

There is an issue with some JVM's where the java.version property doesn't
begin with a version number (usually they have a date).

When running under JDK1.2, try it with -Djava.version=1.2

ie:
java -Djava.version=1.2 my.class

Peter

--       Peter T Mount peter@retep.org.uk     Main Homepage: http://www.retep.org.uk
PostgreSQL JDBC Faq: http://www.retep.org.uk/postgresJava PDF Generator: http://www.retep.org.uk/pdf



RE: [INTERFACES] error insert

От
Craig Orsinger
Дата:
On 07-May-99 abdelkrim wrote:
> CREATE FUNCTION complex_in(opaque)
>    RETURNS complex
>    AS '/usr/local/pgsql/postgresql-6.4.2/src/tutorial/complex.so'
>    LANGUAGE 'c';
> NOTICE:  ProcedureCreate: type 'complex' is not yet defined
> NOTICE:  ProcedureCreate: type 'complex' is not yet defined
> CREATE
       Hmmm. Looks like the 'complex' type needs to be defined first.
I used a different example as a basis for adding types and functions,
it returned 'opaque' rather than a new type.

> CREATE FUNCTION complex_out(opaque)
>    RETURNS opaque
>    AS '/usr/local/pgsql/postgresql-6.4.2/src/tutorial/complex.so'
>    LANGUAGE 'c';
> CREATE
> 
> 
> CREATE TYPE complex (
>    internallength = 16,
>    input = complex_in,
>    output = complex_out
> );
> CREATE
       Have you tried putting this CREATE TYPE statement before the
first CREATE FUNCTION statement?

> CREATE TABLE test_complex (
>   a complex,
>   b complex
> );
> CREATE
> 
> 
> INSERT INTO test_complex VALUES ('(1.0, 2.5)', '(4.2, 3.55 )');
> assertion "u.hdr.e_phentsize == sizeof(Elf_Phdr)" failed: file
> "/usr/src/libexec/rtld-elf/map_object.c", line 118
> pqReadData() -- backend closed the channel unexpectedly.
>   This probably means the backend terminated abnormally before or while
> processing the request.
> We have lost the connection to the backend, so further processing is
> impossible.  Terminating.
> 
> 
> 
> in the root console:
> 
> assertion "u.hdr.e_phentsize == sizeof(Elf_Phdr)" failed: file
> "/usr/src/libexec/rtld-elf/map_object.c", line 118
> 

----------------------------------
Date: 10-May-99  Time: 11:01:42

Craig Orsinger                  (email: <orsingerc@epg.lewis.army.mil>)
Logicon RDA
Bldg. 8B28                      "Just another megalomaniac with ideas above his
6th & F Streets                 station. The Universe is full of them."
Ft. Lewis, WA   98433                   - The Doctor
----------------------------------


RE: [INTERFACES] error insert

От
Craig Orsinger
Дата:
On 10-May-99 Craig Orsinger wrote:
>> CREATE FUNCTION complex_in(opaque)
>>    RETURNS complex
>>    AS '/usr/local/pgsql/postgresql-6.4.2/src/tutorial/complex.so'
>>    LANGUAGE 'c';
>> NOTICE:  ProcedureCreate: type 'complex' is not yet defined
>> NOTICE:  ProcedureCreate: type 'complex' is not yet defined
>> CREATE
> 
>         Hmmm. Looks like the 'complex' type needs to be defined first.
> I used a different example as a basis for adding types and functions,
> it returned 'opaque' rather than a new type.
       I'd suggest replacing "RETURNS complex" with "RETURNS opaque" and
see how that goes.

>> CREATE FUNCTION complex_out(opaque)
>>    RETURNS opaque
>>    AS '/usr/local/pgsql/postgresql-6.4.2/src/tutorial/complex.so'
>>    LANGUAGE 'c';
>> CREATE
>> 
>> 
>> CREATE TYPE complex (
>>    internallength = 16,
>>    input = complex_in,
>>    output = complex_out
>> );
>> CREATE
> 
>         Have you tried putting this CREATE TYPE statement before the
> first CREATE FUNCTION statement?
       This will not work, for reasons that should have been obvious -
the input and output functions would not have been CREATE'd yet.

----------------------------------
Date: 10-May-99  Time: 11:55:53

Craig Orsinger                  (email: <orsingerc@epg.lewis.army.mil>)
Logicon RDA
Bldg. 8B28                      "Just another megalomaniac with ideas above his
6th & F Streets                 station. The Universe is full of them."
Ft. Lewis, WA   98433                   - The Doctor
----------------------------------