1. 12
  1. 2

    I guess the shortcoming is that you can’t do some subquery in the select part, hypothetical syntax:

    select (
      select col_name from meta_info_about_MYTABLE 
      where col_name not in ('nope', 'nada')
    ) from MYTABLE;

    but maybe there could be a hack to get the column names as rows and work from that…

    1. 2

      You can, through the system catalog. Then you could query this and omit the named tables, producing a new query string which can be executed. Unfortunately, I think you need to use a stored procedure to do this (via EXECUTE)

    2. 1

      Wow, the hack is pretty neat. This bash+perl script is a bit intimidating, though :)

      1. 1

        This is great, love stuff like this.