2010/10/6 Little, Douglas <[email protected]>
>
>
>
>
> Unfortunately the variable doesn’t get replaced due to the quotes.
>
> COMMENT ON INDEX mdm_mart_tbls.mdm_gotoastcampaignevt_pk IS 'created by
> dwda-1618 on :currtime';
>
>
>
> I’ve tried various options, 2,3,4 quotes. Concatenation, Building the
> entire string as the variable. But nothing seems to work.
>
>
>
> Any suggestions?
>
>
>
>
>
Try this:
postg...@bdteste=# \set message ''''`echo 'Created by Fabrizio on '``date
'+20%y-%m-%d %H:%M:%S'`''''
postg...@bdteste=# comment on table city is :message;
COMMENT
postg...@bdteste=# \dt+ city
Lista de relações
Esquema | Nome | Tipo | Dono | Tamanho | Descrição
---------+------+--------+----------+------------+--------------------------------------------
public | city | tabela | postgres | 8192 bytes | Created by Fabrizio on
2010-10-06 12:39:04
(1 linha)
--
Fabrízio de Royes Mello
>> Blog sobre TI: http://fabriziomello.blogspot.com
>> Perfil Linkedin: http://br.linkedin.com/in/fabriziomello