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

Поиск
Список
Период
Сортировка
От Tom Good
Тема Re: [HACKERS] [Fwd: In the Soup]
Дата
Msg-id Pine.LNX.3.95.980416133408.1476A-100000@mailhost.nrnet.org
обсуждение исходный текст
Ответ на [Fwd: In the Soup]  ("Thomas G. Lockhart" <lockhart@alumni.caltech.edu>)
Ответы Re: [HACKERS] [Fwd: In the Soup]  (Michael Meskes <meskes@topsystem.de>)
Список 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@q8.nrnet.org>
 North Richmond CMHC/Residential Services     Phone: 718-354-5528
 75 Vanderbilt Ave, Quarters 8                Fax:   718-354-5056
 Staten Island, NY   10305


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: [HACKERS] recursive views
Следующее
От: "Jackson, DeJuan"
Дата:
Сообщение: Bug or Short between my brain and the keyboard?