1. Anuncie Aqui ! Entre em contato fdantas@4each.com.br

[SQL] Postgres copy to TSV file with header

Discussão em 'Outras Linguagens' iniciado por Stack, Outubro 25, 2024 às 07:22.

  1. Stack

    Stack Membro Participativo

    I have a function like so -

    CREATE
    OR REPLACE FUNCTION ind (bucket text) RETURNS table (
    middle character varying (100),
    last character varying (100)
    ) AS $body$ BEGIN return query
    select
    fname as first,
    lname as last
    from all_records
    ; END;
    $body$ LANGUAGE PLPGSQL;


    How do I output the results of select ind ('Mob') into a tsv file?

    I want the output to look like this -

    first last
    MARY KATHERINE

    Continue reading...

Compartilhe esta Página