Re: [HACKERS] [Fwd: In the Soup]

From: Tom Good <tomg(at)nrnet(dot)org>
To: "Thomas G(dot) Lockhart" <lockhart(at)alumni(dot)caltech(dot)edu>
Cc: Thomas Good <tomg(at)q8(dot)nrnet(dot)org>, Michael Meskes <meskes(at)topsystem(dot)de>, Postgres Hackers List <hackers(at)postgreSQL(dot)org>
Subject: Re: [HACKERS] [Fwd: In the Soup]
Date: 1998-04-16 17:47:42
Message-ID: Pine.LNX.3.95.980416133408.1476A-100000@mailhost.nrnet.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


Hmm...I don't have the original as I managed to get it going...
my exec sql commit; line was misplaced (my error not Michael's).
I apologize for wasting your time...

I am *very* stuck on updates that use a call to gets().
scanf() works fine but...
when I need the usr to give me a string for a record update gets()
behaves oddly. The src compiles and links, connects, queries for a
list of records and then uses printf() to ask for usr input.

At this point, it leaps ahead of the current stanza, inputting a null
into the attribute in question.

I have tried making the call to gets() simple:
char usr_buffer[81];
...
printf("Enter blah blah blah: ");
fflush(stdin);
gets(usr_buffer);
and I have tried allocating memory (and making the usr-buffer var
a pointer...) but this also fails.
Finally, I tried making the call to gets() part of a separate
usr defined function. This also compiled without error but
displays the same symptoms.

I raised this once (or twice ;-) but felt a bit sheepish over
my delete blunder so I didn't really want to push the issue.
Having said that, I do wonder if it really is stupidity on my
part or something Michael could have a look at...?

I will send him my code, off-list...

Thanks alot for your patience Tom, you're quite a guy.

----------- Sisters of Charity Medical Center ----------
Department of Psychiatry
----
Thomas Good, System Administrator <tomg(at)q8(dot)nrnet(dot)org>
North Richmond CMHC/Residential Services Phone: 718-354-5528
75 Vanderbilt Ave, Quarters 8 Fax: 718-354-5056
Staten Island, NY 10305

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jackson, DeJuan 1998-04-16 18:56:27 Bug or Short between my brain and the keyboard?
Previous Message Bruce Momjian 1998-04-16 17:22:32 Re: [HACKERS] recursive views