From: ts Date: 2004-02-25T19:32:36+09:00 Subject: Re: PGresult#type (and other postgres questions) >>>>> "G" == Gavin Kistner writes: G> PGresult#type( fieldIndex ) G> What does the number that is returned correspond to? OID G> (Looks like integer/serial is 23, varchar(50) is 1043, smallint is 21 G> .... where is there a lookup of constants for these values?) select oid, typname from pg_type; G> PGconn.escape() Take a String and escape it http://www.postgresql.org/docs/7.4/static/libpq-exec.html#LIBPQ-EXEC-ESCAPE-STRING G> PGconn.escape_bytea( ... ) same than previous but with binary strings http://www.postgresql.org/docs/7.4/static/libpq-exec.html#LIBPQ-EXEC-ESCAPE-BYTEA G> PGconn#insert_table( table, values ) G> What is 'table'? The supplied documentation merely says G> Inserts contents of the array into the table. G> My guess (from playing around) is that 'table' is a String with the name G> of the table, and 'values' must be an Array of tuples (array of arrays). G> Is this correct? yes G> PGconn#status() G> What does this method do? (Not in the supplied documentation.) Returns the result status of the command (PQresultStatus) http://www.postgresql.org/docs/7.4/static/libpq-exec.html G> PGresult#cmdtuples() G> What does this method do? (Not in the supplied documentation.) Returns the number of rows affected by the SQL command. (PQcmdTuples) http://www.postgresql.org/docs/7.4/static/libpq-exec.html#LIBPQ-EXEC-NONSELECT Guy Decoux