Search Postgresql Archives

Re: psql \echo strangeness with :variables

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



In article <m3ejyjp2d8.fsf@xxxxxxxxxxxxxxxxxxxxxxx>,
Jerry Sievers <jerry@xxxxxxxxxxxxxxxx> wrote:

% jsievers@jsievers#
% = \set date `date '+%Y%m%d'`
% 
% jsievers@jsievers#
% = \echo :date
% 20060524
% 
% jsievers@jsievers#
% = \echo foo_:date
% foo_:date   <--  Was expecting this to expand... see below

variables need to be space-delimited in \ contexts. Work-around:

 \set tn 'foo_' :date
 \echo :tn
 create table :tn();

-- 

Patrick TJ McPhee
North York  Canada
ptjm@xxxxxxxxxxxx


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux