Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#36 File size of large files stored incorrectly in postgres

closed
None
5
2006-09-24
2005-04-06
No

In db_sql.c the functions sql_writeint() and
db_readline_sql_int() actually use the int datatypes.

The equivalents in db_file.c have been updated to use
unsigned long long, but for the SQL functions this
requires a closer look.

Discussion

  • Logged In: NO

    that will do; nothing else is required since all db
    manipulation is done via libpq

    also, when upgrading one should fire this sql command:
    ALTER TABLE XXX ALTER size TYPE bigint;
    for each data table ( db, db_out, db_new )

    --- include/db_sql.h.bak 2006-09-18
    00:51:27.000000000 +0200
    +++ include/db_sql.h 2006-09-18 01:34:20.000000000 +0200
    @@ -28,7 +28,7 @@
    "int", /* "perm", */
    "int", /* "uid", */
    "int", /* "gid", */
    - "int", /* "size", */
    + "bigint", /* "size", */
    "text", /* "atime", */
    "text", /* "ctime", */
    "text", /* "mtime", */

     
  • Logged In: YES
    user_id=330646

    The attached patch has been committed to CVS.

     
    • assigned_to: nobody --> rvdb
    • status: open --> closed