HDTenEightyP/NetNews huggingface dataset:
From: cs_mj@gsbacd.uchicago.edu (Mark Jaeger)
Subject: Re: Ingres C-call interface
Organization: 
Date: Thu, 10 Sep 1992 07:34:41 GMT

In article <1992Sep10.031947.17480@csis.dit.csiro.au>, dave@csis.dit.csiro.au 
(David Campbell) writes:
> Does anybody know of a C-call interface into Ingres?
> 
> I am quite aware of the esqlc preprocessor for C but it seems to be
> impossible in esqlc to write a C function which does something like
> "create a new cursor".  It seems that all cursors have to be declared,
> and that makes them statically declared.
>
> dave@csis.dit.csiro.au
> -- 
>   +--------------------------------------------------+-----------------------+
>   | Dave Campbell                                    |            UNIX & C++ |
>   | Phone: + 61 6 275 0944      Fax: + 61 6 257 1052 |   _--_|\       PLEASE |
>   | CSIRO Division of Information Technology         |  /      \             |

INGRES doesn't hae a C-call interface.  You could try reverse
engineering the output of the esqlc preprocessor, but it would be a bad
idea because Ingres feels free to change the calls at will.

You're wrong that cursors have to be static.  INGRES offers dynamic SQL,
including fully dynamic cursors.  If you know what the output columns
look like up front, this isn't hard, but if you want full flexibility,
then it gets somewhat messier.

You're right that cursors have to be declared, but they can be declared
from a dynamic buffer.  I've attached some simple (working) code.

--Mark Jaeger				internet: cs_mj@gsbvax.uchicago.edu
Graduate School of Business		yellnet:  (312) 702-0328
University of Chicago			faxnet:   (312) 702-0233
Disclaimer: My opinions are my own and not those of my employer.
Ich bin ein Virus.  Mach' mit und kopiere mich in Deine .signature.
================================================================================
exec sql INCLUDE sqlca ;
exec sql WHENEVER sqlerror call sqlprint ;
exec sql WHENEVER sqlwarning call sqlprint ;

#include <stdio.h>

static void curloop( const char *stmt ) ;

/*++*/ int main( void ) {

	fprintf( stdout , "Connecting..." ) ; fflush( stdout ) ;
	exec sql CONNECT 'iidbdb' ;
	fprintf( stdout , "done.\n" ) ;

	curloop( "select distinct table_name from iitables" ) ;
	curloop( "select distinct table_owner from iitables" ) ;

	exec sql DISCONNECT ;

	}

/*++*/ static void curloop( const char *stmt ) {
#ifdef ARGS_FOR_ESQL
	exec sql BEGIN DECLARE SECTION ;
	char *stmt ;
	exec sql END DECLARE SECTION ;
#endif
	exec sql BEGIN DECLARE SECTION ;
	char buf[ 80 ] ;
	exec sql END DECLARE SECTION ;

	exec sql DECLARE my_stmt STATEMENT ;
	exec sql PREPARE my_stmt FROM :stmt ;
	exec sql DECLARE my_cur CURSOR FOR my_stmt ; 

	fprintf( stdout , "Opening cursor for statement:\n%s...\n" , stmt ) ;
	exec sql OPEN my_cur FOR READONLY ;
	fprintf( stdout , "done.\n" ) ;

	while( 1 ) {
		exec sql FETCH my_cur INTO :buf ;
		if ( 0 != sqlca.sqlcode ) break ;
		fprintf( stdout , "%s\n" , buf ) ;
		}

	exec sql CLOSE my_cur ;
	fprintf( stdout , "\n" ) ;

	} /* end of curloop */

Newsgroups: comp.databases.ingres
From: mendonza@apple.com (Jeff Mendonza)
Newsgroups: comp.databases.ingres
Subject: Re: query on date
Date: 4 Sep 92 21:16:40 GMT
Organization: Relational DB Developers, Inc.

John:

Your query works just fine!! BETWEEN predicate is referenced in chapter 2-70.

Operator										  												Meaning	
--------							   														-------------
y BETWEEN x AND z															x <= y AND < <= z
y NOT BETWEEN x AND z											NOT (y BETWEEN x AND z)


x, y & z are expressions, and connot be subqueries


Hope this helps


Jeff M

In article <IebhlJS00io7AIuUlc@andrew.cmu.edu>, jj23+@andrew.cmu.edu (John Hawfeng Jeng) writes:
> 
> I would like to make some query base on date using BETWEEN.  Can anyone
> verify the following query for me since I could not find anything
> similar in the reference manual?
> 
> 	select *
> 	from transaction
> 	where date_time_of_transaction between :start_date and :end_date
> 	and account_number = :in_account_number;
> 
> Thanks in advance,
> John Jeng
Xref: sparky comp.databases.ingres:1334 comp.sys.next.misc:19420
From: arzt@dccs.upenn.edu (Noam H. Arzt)
Newsgroups: comp.databases.ingres,comp.sys.next.misc
Subject: Ingres and NeXT (finally)
Date: 8 Sep 92 20:53:17 GMT
Followup-To: comp.databases.ingres

I run a site license for Ingres here at Penn, and I am also an avid NeXT fan  
and user. I have been pressuring NeXT and Ingres for some time to come up with  
a solution for this platform.

I just got off the phone with Ingres in Alameda, and a gentleman who works for  
a small company in Minnesota called Rathe, Inc. Ingres has signed up this  
company into their ISV (Independent Software Vendor) program.

Rathe has developed a piece of generic Unix middleware that allows desktop  
clients to attach to database servers through their product which sits on the  
same machine as the database (similar to SequeLink and Apple/Pacer's DAL). They  
are now developing a NeXT DBkit adapter for their server on one end, and an  
adapter between their server and Ingres on the other end. While this is not a  
native Ingres solution, it should work just fine.

Their timetable is aggressive, since they apparently have customers waiting.  
They initially have a Sun version of their product, and hope to go into a short  
beta cycle on the server and NeXT piece by Oct 1, with a shipping product by  
the end of October.

They have had other requests for RS/6000 (slated to be next) and Sequent, and  
are willing to talk about DEC/Ultrix as well.

I encourage anyone with interest in Ingres and NeXT to let Ingres, NeXT and  
Rathe know that we want these products to develop and mature. Here are some  
relevant folks to contact:

Ingres: Michele Felde, Director ISV Program, 800/446-4737 x3689  
(mfelde@ingres.com)
NeXT: Ron Weissman, Director Strategic Marketing, 415/366-0900  
(ron_weissman@next.com)
Rathe: Greg Noel, not sure of title, 612/225-1401 (rathe!gn@cs.umn.edu)

Regards,

Noam

--
Mr. Noam Arzt                            215/898-3029 (voice)
Director, Special Projects               215/898-9348 (FAX)
University of Pennsylvania               arzt@dccs.upenn.edu
Data Communications & Computing Services (NeXTmail is OK)
Suite 221A, 3401 Walnut Street, Philadelphia, PA 19104
Newsgroups: comp.databases.ingres
From: pavlov@niktow.canisius.edu (Greg Pavlov)
Newsgroups: comp.databases.ingres
Subject: alternate sort areas
Date: 15 Sep 92 09:01:28 GMT
Organization: Canisius College, Buffalo NY. 14208


  We are running 6.4/01 on DEC RISC under ULTRIX.

  Per the 6.4 release notes and DBA manual, we created alternate sort areas.
  This improved performance some and all worked well for a while.  Then prob-
  lems cropped up: periodically, INGRES failed to find or could not create
  a termporary file (it seemed to encounter problems creating/deleting files
  with "unique" names).

  After several go-arounds with tech support, we were finally told that temp-
  orary sort areas are "not supported" and that they couldn't help us.  So
  the areas were decommisioned.

  Has anyone else encountered this ?  

  Also, what information do people have re reallocation of default area - based
  functions to alternate locations ?  At present, our largest database is 
  distributed across 5 areas but the default is a perennial bottleneck: INGRES
  uses it for umpteen functions and we can't count on our users to consistently
  route THEIR private/temporary tables to other areas.  Will we ever see the
  ability to specify an alternate "default" area for temporary/private tables?
  Is it that difficult to implement this ???


  pavlov@fstrf.org
From: liz@marvin.contex.com (Elizabeth Cyr Jones)
Newsgroups: comp.databases.ingres
Subject: Newbie needs info
Date: 15 Sep 92 15:50:50 GMT
Organization: Xyvision Design Systems

Newsgroups: comp.database.ingres
Subject: Newbie needs info
Summary: 
Followup-To: 
Distribution: world
Organization: Xyvision Design Systems
Keywords: 


Hi all--

Forgive me if this the incorrect place to ask newbie questions
re: learning Ingres (or yell at me and I'll go away), but here goes:

1) What book would be the best starting place for someone who
   wants to learn Ingres? (And the person has limited programming
   knowledge.)

2) As far as "classes" or traveling seminars go, are there any
   recommendations as to specific companies that do a good job?

Thanks for your help.

Liz Jones
liz@contex.com
Newsgroups: comp.databases.ingres
From: jtb@spot.Colorado.EDU (John Broad)
Subject: How to pass parameter to CALL SYSTEM under ABF or Windows4gl?
Organization: University of Colorado, Boulder
Date: Tue, 15 Sep 1992 15:44:06 GMT

What is the syntax for passing parameters to shell commands in Ultrix or
another UNIX system?
From: richard@asis.unimelb.EDU.AU (Richard Begg)
Newsgroups: comp.databases.ingres
Subject: Re: Ingres 6.3 Bug in ABF Call Report?
Date: 6 Sep 92 06:53:10 GMT

In comp.databases.ingres you write:

|The set-up:   Ingres 6.3 under OSx 5.0 on a Pyramid MIS 4/2

|The problem:  I'm having a problem getting ABF Call Report to accept
|              parameters whose value includes hyphens.

[..deleted..]

The problem is that 'call report' is simply a wrapper around a shell
script which calls the 'report' program.  I can't say that I have had
any trouble with hyphens, but I have with other characters including
quotes (single and double) and brackets.  We overcame the problem
by writing a embedded SQL procedure which calls report-writer directly
(via exec) rather than through a shell script.  The down side of
this is that you have to encode the parameters yourself into a string
of the format specifed by the report command (we have another procedure
which does this).  This method works for all parameters except a single
quote which I couldn't get to work and was forced to filter them out
before running the report.

|Many Thanks & Regards for your help,
|                          ____                  
|Darryl E. Marsee         |    \   1926 CCSG/SCCI 205 Perry Street
|Control Data Systems     |  *  \  Robins Air Force Base, GA 31098
|demarsee@wrdis01.af.mil  |_____/  demarsee@logdis1.wr.aflc.af.mil

--

Richard Begg (richard@asis.unimelb.edu.au)
Admin Systems and Info Services - University of Melbourne.
Newsgroups: comp.databases.ingres
From: sfc@tpghq.com (Steve Caswell)
Subject: Re: Blobs in Ingres 6.5
Organization: Palmer & Associates, Inc.
Date: Fri, 11 Sep 1992 01:53:42 GMT

I believe that the 2000 byte (actually, the real limit is 2010 bytes) limit is
a historical limit.  An INGRES page is actually 2048 bytes, which makes writing
the kind of code that runs INGRES much easier.  The biggest problem from a
development standpoint is that the 2048 page size permeates most areas of the
code.  From attending the Developer's Panel at the Tampa IUA this past May,
I understand that Ingres is working on ovrcoming this arbitrary limit, but
there is no particular time frame for this to occur.  There is something to
be said in theory for keeping tables as small as possible, but reality dictats
that "as small as possible" may very well be somehting larger than 2000 bytes.

-- 

Steve Caswell           |   (404) 448-7727    |  "The opinions expressed are my
Principal Consultant    |   sfc@tpghq.com     |   own.  They may not be perfect,
The Palmer Group        |   uunet!tpghq!sfc   |   but they're all I've got."
Newsgroups: comp.databases.ingres
From: pjk39593@uxa.cso.uiuc.edu (Jud Kenney)
Subject: socket-to-socket connections...
Summary: socket-to-socket connections...
Organization: University of Illinois at Urbana
Date: Thu, 10 Sep 1992 22:54:53 GMT
Keywords: performance, sockets, ingres

A few months ago there was a discussion here about improving performance across
a network with ingres, and one of the items was on socket-to-socket 
connections...

Someone posted a summary of the discussion; does anyone have that archived, and
could you repost it?

Thanks in advance...


-- 
The opinions stated here are my own, and not endorsed by or supported by
the University of Illinois.

pjk39593@uxa.cso.uiuc.edu			Jud Kenney, Student-at-Large
From: graeme@hart.actrix.gen.nz (Graeme Hart)
Newsgroups: comp.databases.ingres
Subject: Re: Blobs in Ingres 6.5
Date: 9 Sep 92 19:20:44 GMT

sethg@dcatlas.dot.gov (Seth Grimes @ U.S Dept. of Transportation) once wrote....
>ghica@fig.citib.com (Renato [Titanium Cranium] Ghica) writes:
>
>
>
>>so does anyone know why the 2000 byte limitation exists, anyway?
>>Is it that anything with more than 2000 bytes/row is considered to be
>>"bad" database design?
>
>Ingres stores data in 2048-byte pages and can't span records over a page.


What a bummer, aren't you annoyed you aren't using a real database like
InterBase 

 :) - Sorry, I just couldn't resist...



Graeme

----
Graeme Hart                                     Telephone:  64 4 3829124  
graeme@hart.actrix.gen.nz                       Snail Mail: PO Box 11865    
                                                            Wellington       
                                                            New Zealand

Newsgroups: comp.databases.ingres
From: sfc@tpghq.com (Steve Caswell)
Subject: Re: Manually waking the archiver?
Organization: Palmer & Associates, Inc.
Date: Mon, 14 Sep 1992 15:23:52 GMT


>I recently started looking at this question, although for different 
>reasons.  I would like to backup the journal files before taking an off-line 
>checkpoint.  Would shutting down Ingres clean out the log file? 

Shutting down INGRES would clean out the log file.  However many sites cannot
afford to shut down INGRES just for this reason.

>checkpoint.  Would shutting down Ingres clean out the log file? Steve 
>Caswell's suggestion of modifying the checkpoint templates in the [ingres.
>files.checkpoint] directory does not seem to give one much control over what 
>is being done.
>
>Mike Reid <REID@UPEI.CA>

Just the opposite, you do have a lot of control over what is being done.  The
fact that ckpdb calls these command procedures means that you can tailor the
checkpoint as needed.  You could, for example, back up the journal files 
before the checkpoint is run.  If you have multiple tape drives, you could
spawn several subprocesses and back up to each of these drives concurrently.
If you do not like the way the backup command is used, you can change it or
replace it with something else.  The possibilities are limitless.

-- 

Steve Caswell           |   (404) 448-7727    |  "The opinions expressed are my
Principal Consultant    |   sfc@tpghq.com     |   own.  They may not be perfect,
The Palmer Group        |   uunet!tpghq!sfc   |   but they're all I've got."
Newsgroups: comp.databases.ingres
From: sgccsns@citec.oz.au (Shane Noel Smith 2245702)
Subject: GOSIP
Organization: CITEC
Date: Wed, 9 Sep 1992 05:21:24 GMT

Hello,


I am trying to find out some information regarding the implementation
of the OSI  transport layer 4 being available for Ingres*Net and
if anyone has a commitment from Ingres to GOSIP standards of any country.



-------------------------------------------------------------
|  Shayne Smith          |  Department of Family Services,  |
|                        |  Aboriginal and Islander Affairs |
|  sgccsns@citec.oz.au   |  Queensland AUSTRALIA            |
|------------------------|-----------------------------------
|  GPO Box 806           | These are my personal views only |
|  Brisbane              | My employer doesn't pay me       |
|  Qld, AUSTRALIA 4001   | enough to think fo them          |
-------------------------------------------------------------

Newsgroups: comp.databases.ingres
From: Gavin Trigg <gavin@asis.unimelb.EDU.AU>
Subject: Re: E_DM9004 (too many open files)
Organization: National Radio Astronomy Observatory
Date: Thu, 10 Sep 1992 21:21:11 GMT

> 
> Here's an error that appears at seemingly random times.  Whenever I rerun
> the program that causes this error, it works fine:
> 
>       ::[4026            , 00849660]: Wed Sep  9 11:20:04 1992  
> E_DM9004_BAD_FILE_OPEN   Disk file open error on database:sid                       
> table:Not a table pathname://ingres/dmp/default/sid filename:aaaaaaaa.cnf
> open() failed with UNIX error 24 (Too many open files)
> 
> Now the program doesn't touch very many tables and it does a lot of
> friendly things like commits, so I don't see how it can have too many
> files open....
> 
> /a
> 
Alan,

How many open files does the system have?  Is it close to the limit?  On
SunOS you can use pstat -T to find out.  We've come up against this on a
number of occasions.  On each occasion, we rebuilt the kernel to solve the
problem.  The hardest part is having enough people inconvenienced so that they
can out vote those who don't want an immediate 5-15 minute reboot ;-)

-- 
Gavin Trigg	Internet: gavin@asis.unimelb.EDU.AU
		Telephone: +61 3 344 6003 	Fax +61 3 347 4803
Data Base Administrator, Information Technology Services (ASIS),
The University of Melbourne, Parkville, Australia.  3052.
Newsgroups: comp.databases.ingres
From: cathys@Ingres.COM (Cathy Savino)
Subject: Re: QBF won't let me append thru a view?
Reply-To: cathys@ingres.com (Cathy Savino)
Organization: Ingres, An ASK Company
Date: 8 Sep 92 20:19:37 GMT


Well, I'm not sure if your on drugs or not, but  I am sure that QBF will 
not allow you to update or insert through views. The error message is pretty
Explicit ( Cannot use APPEND Function on views. (E_QF0086)).
There is no way around this except to update
the base table. You can update views from sql or isql, which means that you 
could write a simple abf or embedded SQL program to do this, but there's no way
to 'fake out' QBF, to do it there. There is a outstanding Software Improvement
Request to add this functionality (SIR # 37839), there has also been a 
documentation bug entered so that this will be more clearly documented.

Disclaimer: I express my opinions, and noone else's.


--
Cathy Savino 
   ___     _____   __  __       Ingres, An ASK Company
  / _ \   / ____\  | |/ /       1080 Marina Village Parkway
 / /_\ \  \____ \  | |\ \       Alameda, Ca 94501
/_/   \_\ \_____/  |_| \_\      (510) 748-3524
                                cathys@ingres.com

Newsgroups: comp.databases.ingres
From: sethg@dcatlas.dot.gov (Seth Grimes)
Subject: Re: Blobs in Ingres 6.5
Organization: U.S Dept. of Transportation
Date: Thu, 10 Sep 1992 12:02:01 GMT

graeme@hart.actrix.gen.nz (Graeme Hart) writes:

>>Ingres stores data in 2048-byte pages and can't span records over a page.

>What a bummer, aren't you annoyed you aren't using a real database like
>InterBase 

Don't forget, Ingres will have BLOBs in the next major release, probably
in early '93, and you can already integrate BLOBs into Windows/4GL 
applications.
Newsgroups: comp.databases.ingres
From: sethg@dcatlas.dot.gov (Seth Grimes)
Subject: Re: Blobs in Ingres 6.5
Organization: U.S Dept. of Transportation
Date: Wed, 9 Sep 1992 02:13:40 GMT

ghica@fig.citib.com (Renato [Titanium Cranium] Ghica) writes:



>so does anyone know why the 2000 byte limitation exists, anyway?
>Is it that anything with more than 2000 bytes/row is considered to be
>"bad" database design?

Ingres stores data in 2048-byte pages and can't span records over a page.
From: pavlov@niktow.canisius.edu (Greg Pavlov)
Newsgroups: comp.databases.ingres
Subject: Re: Blobs in Ingres 6.5
Date: 15 Sep 92 08:46:40 GMT
Organization: Canisius College, Buffalo NY. 14208

In article <1992Sep8.153747.12814@fig.citib.com>, ghica@fig.citib.com (Renato [Titanium Cranium] Ghica) writes:
> 
> 
> so does anyone know why the 2000 byte limitation exists, anyway?
>
  I had assumed that it was related to INGRES's logical "page" size, no ?

  greg pavlov
  pavlov@fstrf.org
Newsgroups: comp.databases.ingres
From: davidw@cs.UAlberta.CA (David R! Woloschuk)
Subject: How Do You Empty a database?????????
Organization: University of Alberta, Edmonton, Canada
Date: Fri, 11 Sep 1992 04:16:07 GMT


Does anyone know if there is a command that a User could issue
that *empties* a database (tables, forms, applications etc.) 
without actually destroying the database?

I want to find a command that, in essence, returns the database to
a state that it was in *just* after it was created using
'createdb'.  

'destroydb' followed by 'createdb' cannot be used in this case.

Any suggestions?

david r! woloschuk
Newsgroups: comp.databases.ingres
From: ghica@fig.citib.com (Renato [Titanium Cranium] Ghica)
Subject: Re: Blobs in Ingres 6.5
Originator: ghica@duck
Organization: Citibank IBISM
Date: Tue, 8 Sep 1992 15:37:47 GMT



so does anyone know why the 2000 byte limitation exists, anyway?
Is it that anything with more than 2000 bytes/row is considered to be
"bad" database design?
-- 
--------------------------------------------------------------------------
"These views are my own. / Mail me or Flame me"

>@)
Newsgroups: comp.databases.ingres
From: sethg@dcatlas.dot.gov (Seth Grimes)
Subject: Re: How Do You Empty a database?????????
Organization: U.S Dept. of Transportation
Date: Fri, 11 Sep 1992 12:55:02 GMT

davidw@cs.UAlberta.CA (David R! Woloschuk) writes:

>Does anyone know if there is a command that a User could issue
>that *empties* a database (tables, forms, applications etc.) 
>without actually destroying the database?

>I want to find a command that, in essence, returns the database to
>a state that it was in *just* after it was created using
>'createdb'.  

>'destroydb' followed by 'createdb' cannot be used in this case.

First off, off course you don't want to drop _all_ the tables in the
DB -- you want to keep the system tables and views, i.e., the system
catalogs.  Given the complexity of the catalogs, even though you could
go through each of them and delete all the rows for non-system objects,
it would be a cumbersome task.  You could write a utility to do it, but
why would anyone bother since the straight-forward way of reinitializing
a DB is to destroy it and recreate it?  Why can't you do this, for 
technical or for political reasons?

Seth Grimes, dcatlas!sethg@uunet.uu.net
From: mendonza@apple.com (Jeff Mendonza)
Newsgroups: comp.databases.ingres
Subject: Re: Access two INGRES databases from one application
Date: 4 Sep 92 21:51:54 GMT
Organization: Relational DB Developers, Inc.

If you use ingres in distributed enviroment (INGRES/STAR) then you would access
all tables as follows:

Say that PHYSICAL DATABASE 1 = Acctdb  
         PHYSICAL DATABASE 2 = Salesdb.

Acctb has customer_master, acct_master, acct_detail
Salesdb has customer_master, sales_master, sales_detail

Use starview to register these tables in the distributed environment:

register tablename/view newtablename/view (col1,coln...) as link 
from database.tablename with node=ATLAS, dbms=INGRES.

The query in ABF would be as follows:

SELECT  :host_variable = acct.customer_id
FROM    newtablename1 acct,
        newtablename2 sales
WHERE   acct.customer_id = sales.customer_id;


Hope this helps.


Jeff M


####
In article <1992Aug27.191412.26719@news.columbia.edu>, alan@curta.cc.columbia.edu (Alan Crosswell) writes:
> 
> In article <1992Aug27.171509.14440@intelhf.hf.intel.com>  
> xli@hfglobe.intel.com (Xiaoqing Li) writes:
> >     Does anyone know if an application can connect to two or more INGRES 
> >     databases and keep them open at the same time (that is, the  
> application
> >     needs to retrieve data from more than one INGRES databases and it  
> only
> >     does one "connect" statement per database while the application is  
> running,
> >     for the performance reason)?  If so, could you specify how?  Thanks!
> > 
> >     Xiaoqing Li
> > i
> 
> Yes, you can do a set session and switch back and forth.  Alternatively,
> you can get Ingres/Star and do joins, etc. across multiple DBs on the same
> host or across the network.
Newsgroups: comp.databases.ingres