473,394 Members | 2,048 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

pgTcl and Refcursors

Everyone,

I am about to begin a project which will use Java (JDBC) and postgresql.
In most Java projects, I do not embed SQL code, but create functions
which have the SQL logic. I call the functions from within my Java
code. For selects, the functions return refcursors, which the Java code
can get results from.

However, a seperate team is going to be using Tcl to do some rapid
prototyping. I would rather re-use as much of their work as possible.
If they also put all their SQL logic into functions, I can make my code
call the same functions. The question is, can Tcl process a resultset
provided as a refcursor by a function? I am not very familiar with Tcl,
and a scan of the PostgreSQL documentation's pgTcl section didn't seem
to provide an answer (at least to me).

Any help you provide would be appreciated.

Thanks,
--
Philip A. Chapman

Application Development:
Java, Visual Basic (MCP), PostgreSQL, MySQL, MSSQL
Linux, Windows 9x, Windows NT, Windows 2000, Windows XP

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFBLMeRAdpynRSGw3URAnR5AJ48hVESnaeFzeUIbRvVd+ Q8oQdw/QCfbzJT
XP2aTCdsn21UsE8+mZdX2Kw=
=iB0w
-----END PGP SIGNATURE-----

Nov 23 '05 #1
1 1289
"Philip A. Chapman" <pc******@pcsw.us> writes:
The question is, can Tcl process a resultset
provided as a refcursor by a function?


Sure, just issue a FETCH command with the cursor name.

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to ma*******@postgresql.org

Nov 23 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Robert Scheer | last post by:
Hi. I wrote some stored procedures used by a web application. As I am fairly new to Oracle, I am missing some concepts when creating these procedures, as a result, the application is suffering...
0
by: Tim Smith | last post by:
I have a stored procedure which returns several ref cursors. I have a few requirements which I am trying to achieve. 1) Ensure SQL is easy to validate by inspection 2) Execute minimum number of...
7
by: vb_bv | last post by:
Does Pyton PL/SQL programming language of Oracle support? Thx
1
by: Bob Powell | last post by:
To whom it may concern: I installed postgres 7.3.4 on my laptop and have successfully been able to add the language pgsql. I haven't been able to get tcl to install properly even though I have...
14
by: Marc G. Fournier | last post by:
After a relatively short period for beta5, where nothing major arose, we have just packaged up our first Release Candidate for v7.4, with the hopes of producing a full release over the next 7 to 14...
7
by: Willem Herremans | last post by:
I am developing a client application for postgreSQL in Tcl/Tk (see http://gborg.postgresql.org/project/pfm ). It mainly uses PgTcl or pgintcl. I don't have any problems with those, but I am also...
0
by: Jerry LeVan | last post by:
Here is how I spent the last couple of days... Using aqua tcl/tk with postgresql seems to take a bit of extra work. With clues from Dan Steffen, I think I have it working... Here is the...
1
by: Larry Dooley | last post by:
Here's my issue. We've decided to replace a very critical (without it the business would lose lots of money) departmental reporting system with a built from scratch system based on .NET. The key...
1
by: aigoracle | last post by:
Hi, i have a problem where i have a procedure which returns a refcursor as OUT parameter. CREATE PROCEDURE ABC(policy_dt IN DATE, transactionRS OUT REFCURSOR) as begin
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.