PROBLEMS WITH GENERIC CONNECTIVITY

From: Alejandro Fuentes González <alejandro(dot)fuentes(at)SSP(dot)DF(dot)GOB(dot)MX>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Jason Topaz <topaz(at)panix(dot)com>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: PROBLEMS WITH GENERIC CONNECTIVITY
Date: 2003-07-24 22:47:38
Message-ID: 3B6938C4F833D71181C5000874335A5E0312EF@mail.ssp.df.gob.mx
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Hi, when I use the psqlODBC with MS-Access I´ve got not problems but when I
try to use it with Oracle the next message appears:

SELECT * FROM "ORACLE"."TABLITA"@POSGRES
*
ERROR at line 1:
ORA-28500: connection from ORACLE to a non-Oracle system returned this
message:
[Generic Connectivity Using ODBC]Record &SQLREC has no fields. Loading
failed
ORA-02063: preceding 2 lines from POSGRES

Altougth I´ve got already fields in the tables, I´ve tried with differnt
kind of datatypes varchar char int numeric....but the problem persist

Any Idea???

Thanks in advance

-----Mensaje original-----
De: Tom Lane [mailto:tgl(at)sss(dot)pgh(dot)pa(dot)us]
Enviado el: Miércoles, 23 de Julio de 2003 10:35 a.m.
Para: Jason Topaz
CC: pgsql-novice(at)postgresql(dot)org
Asunto: Re: [NOVICE] Struggling with set-returning functions, seeking advice

Jason Topaz <topaz(at)panix(dot)com> writes:
> 1) Note that my first attempt (view "ranges_setview_broken", referring
> to a pgplsql set function "make_rows") fails. But when I make a
> second function with identical signature, but in language 'sql'
> (it's just a passthrough to my original pgplsql function), suddenly
> the server error goes away. This seems strange to me.

It's an implementation artifact: plpgsql uses a different implementation
method to return sets than sql does. sql's method works both in SELECT
lists and in FROM, plpgsql's only works in FROM.

The trouble with a set function in FROM is that it can't take any parameters
that are extracted from other tables in the query. There has been some talk
of fixing that by implementing SQL99's LATERAL() syntax, but we haven't yet
wrapped our heads around exactly what would be involved there. In the
meantime, the way you're doing it is probably as good as you're going to
get.

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo(at)postgresql(dot)org so that your
message can get through to the mailing list cleanly

Browse pgsql-novice by date

  From Date Subject
Next Message Jay R 2003-07-25 03:31:04
Previous Message Avi Schwartz 2003-07-24 20:55:13 Re: Questions about Exists-Not exists clause