Hi Folks,

I would like to hear from you guys a suggestion how could I use a struct (if possible) to insert a row in a PgSQL table via tablewriter.

Let me explain the situation. I have a struct that represents a single row of a table, like:

typedef struct TABLE_ROW : TBaseInputRow
{
    char    FIELD_A[20];
    int        FIELD_B;
    double    FIELD_C;

    void Load(istream &file);    //loads itself (one row) from the input stream
} *PCHARGE_ROW;
const char TableRowFmt[] = "%s|%d|%.2f\n";

The table I want to insert has the same definition of the struct (char[20], int, double). Is there a way to insert this one-row struct into the table via tablewirter? if not, which other approaches do you suggest?

thank you,

-Rilson
_______________________________________________
Libpqxx-general mailing list
[email protected]
http://gborg.postgresql.org/mailman/listinfo/libpqxx-general

Reply via email to