Nicolao wrote:
> In article <>, Richard Bos
> <> wrote:
>
> [snip]
>
>
>>This is natural language processing? There are languages that try to
>>cater specifically to such tasks. Have you seen Snobol or Icon?
>>
>>
>>>In the db, each 'word' has a codestring which contains a detailed
>>>syntactical analysis. So I'm going to need a language which will 1)
>>>readily fetch those codestrings from the db and place them alongside
>>>their 'words', and 2) be easily splitable into segments (e.g. the 1st
>>>character of the string might determine whether the word is a noun, and
>>>the 2nd, whether that noun is singular or plural - etc).
>>
>>Both are entirely possible in C, but might be easier in specialist
>>languages. I wouldn't require Perl unless you like reading line noise,
>>though :-/
>>
>>Richard
>
>
> Thanks Richard
>
> I'll certainly check out Snobol & Icon, but I'd prefer it to be
> possible in C, as so far I've enjoyed my little experiments. So I
> reckon to stick at it.
>
> Thanks for your help
>
> Nic
Perhaps this has already been posted, and I missed it, but
http://www.postgresql.org/docs/7.4/static/index.html
has some pretty comprehensive documentation. Chapter 27 deals
specifically with the C interface to PostgreSQL.
What you are trying to do is not that difficult, and from what I have
read you're getting closer.
And, while it is probably beyond the scope here, a word to the wise --
if the program is not just for YOUR general use, it is always a good
idea to either escape the input you get via your scanf (PQescapeString
is the call I believe), or else use prepared queries to avoid SQL
injection attacks. But again, probably beyond the scope until you get
your basic functionality up and running....
Hope this helps a bit,
Frank