Adrian Klaver writes:
> On 03/23/2015 06:59 AM, Scott Ribe wrote:
>> create or replace function archive_some_stuff() returns void as $$
>> declare cutoff timestamptz;
>> begin
>> cutoff := now() - '1 day'::interval;
>> copy (select * from log where end_when < cutoff) to ...
> "Variable substituti
On 03/23/2015 06:59 AM, Scott Ribe wrote:
create or replace function archive_some_stuff() returns void as $$
declare cutoff timestamptz;
begin
cutoff := now() - '1 day'::interval;
copy (select * from log where end_when < cutoff) to ...
...
Gives me an error that there is column named cu
create or replace function archive_some_stuff() returns void as $$
declare cutoff timestamptz;
begin
cutoff := now() - '1 day'::interval;
copy (select * from log where end_when < cutoff) to ...
...
Gives me an error that there is column named cutoff. (Other uses of cutoff in
queries not ins