• Tom Lane's avatar
    Be pickier about converting between Name and Datum. · 55c3391d
    Tom Lane authored
    We were misapplying NameGetDatum() to plain C strings in some places.
    This worked, because it was just a pointer cast anyway, but it's a type
    cheat in some sense.  Use CStringGetDatum instead, and modify the
    NameGetDatum macro so it won't compile if applied to something that's
    not a pointer to NameData.  This should result in no changes to
    generated code, but it is logically cleaner.
    
    Mark Dilger, tweaked a bit by me
    
    Discussion: <EFD8AC94-4C1F-40C1-A5EA-304080089C1B@gmail.com>
    55c3391d
postgres.h 23.5 KB