Обсуждение: Using 'insert' command from libpq: variables

Поиск
Список
Период
Сортировка

Using 'insert' command from libpq: variables

От
Paul Mills
Дата:
Search as I may through the documentation, I have seen no
examples of how to use C languange variables as arguments of the
SQL 'insert' command in libpq.  All examples show explicit
values being inserted.  I want to have a program get user input
and plsce it into variables where the values can be verified
before being inserted.  How do I do this? i.e. can I just say,
'insert into <table> values ( var1, var2 var3 ...)'

Paul



Re: Using 'insert' command from libpq: variables

От
Tom Lane
Дата:
Paul Mills <cybrinjn@gis.net> writes:
> Search as I may through the documentation, I have seen no
> examples of how to use C languange variables as arguments of the
> SQL 'insert' command in libpq.

libpq doesn't do that ... I think ecpg might be what you are
looking for.
        regards, tom lane