> I just want to extract last months data, but I don't know whether the
> month ended with 29,30 or 31 (external program, that uses postgres),

  select * from t1
    where d >= (date_trunc('month', timestamp 'today')
        - interval '1 month')
      and d < date_trunc('month', timestamp 'today');

                    - Thomas

Reply via email to