export of tables with bytea columns

Anonymous
2004-02-24
2004-02-27
  • Anonymous - 2004-02-24

    Hello,

    Maybe I have found a bug in the export routine of phppgadmin, at last it doesn't work as it should.

    I use phppgadmin 3.2.1 and postgresql 7.4.1.

    If I export a table, which contains bytea columns, with phppgadmin, bytea-fields with NULL value are exported as '' whereas when I use pg_dump, they are correctly exported ass NULL.

    Example:

    CREATE TABLE test (
    id                               INT,
    test                     BYTEA
    );

    INSERT INTO test VALUES (1,NULL);

    Export with pg_dump:

    bash-2.05b$ pg_dump -U postgres -t test -aD retrovirology
    --
    -- PostgreSQL database dump
    --

    SET SESSION AUTHORIZATION 'postgres';

    SET search_path = public, pg_catalog;

    --
    -- Data for TOC entry 1 (OID 303986)
    -- Name: test; Type: TABLE DATA; Schema: public; Owner: postgres
    --

    INSERT INTO test (id, test) VALUES (1, NULL);

    Export with phppgadmin:
    (Data only, Format: SQL)

    INSERT INTO "test" ("id", "test") VALUES ('1', '');

    Does phppgadmin use it's own export-routines?

    Best regards,
    Daniel Struck

     
    • Christopher Kings-Lynne

      phpPgadmin has it's own (crappy) export routine.  However, I have just this very second released phpPgAdmin 3.3 which you can configure to actually use pg_dump to do the dumping.

       
    • Anonymous - 2004-02-27

      thanks, I'll give it a try on Monday

       

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks