7:22:21 PM
Subject: [GENERAL] difference between current_timestamp and now() in quotes
test2=# create table dupa(a timestamp, b serial);
NOTICE: CREATE TABLE will create implicit sequence "dupa_b_seq" for
serial column "dupa.b"
CREATE TABLE
test2=# insert into dupa(a) select current
On 2009-01-22, Adrian Klaver wrote:
> On Thursday 22 January 2009 8:16:46 am Alvaro Herrera wrote:
>> Grzegorz Jaśkiewicz escribió:
>> > test2=# insert into dupa(a) select 'current_timestamp' from
>> > generate_series(1,100);
>> > ERROR: date/time value "current" is no longer supported
>> > LINE
On Thursday 22 January 2009 10:04:05 am Alvaro Herrera wrote:
> Adrian Klaver escribió:
> > At least on 8.2 'now()' does not work either at least not in the way I
> > think you want. I get:
> >
> > test=# SELECT 'now()';
> > ?column?
> > --
> > now()
> > (1 row)
>
> alvherre=# select 'no
Adrian Klaver escribió:
> At least on 8.2 'now()' does not work either at least not in the way I think
> you want. I get:
>
> test=# SELECT 'now()';
> ?column?
> --
> now()
> (1 row)
alvherre=# select 'now()'::unknown::timestamptz;
timestamptz
On Thursday 22 January 2009 18:57:16 Osvaldo Kussama wrote:
> 2009/1/22, Adrian Klaver :
> > On Thursday 22 January 2009 8:16:46 am Alvaro Herrera wrote:
> >> Grzegorz Jaśkiewicz escribió:
> >> > test2=# insert into dupa(a) select 'current_timestamp' from
> >> > generate_series(1,100);
> >> > ERROR
2009/1/22, Adrian Klaver :
> On Thursday 22 January 2009 8:16:46 am Alvaro Herrera wrote:
>> Grzegorz Jaśkiewicz escribió:
>> > test2=# insert into dupa(a) select 'current_timestamp' from
>> > generate_series(1,100);
>> > ERROR: date/time value "current" is no longer supported
>> > LINE 1: insert
well, I am asking that - for pure curiosity reason.
I got a function in C, that automagically puts all data in quotes, and
that's how I came across that strange difference between current_time
and now(). Funny enough, pg will translate first one to latter in
domains, for instance.
--
Sent via pgs
On Thursday 22 January 2009 9:07:37 am Jason Long wrote:
> Adrian Klaver wrote:
> > On Thursday 22 January 2009 8:16:46 am Alvaro Herrera wrote:
> >> Grzegorz Jaśkiewicz escribió:
> >>> test2=# insert into dupa(a) select 'current_timestamp' from
> >>> generate_series(1,100);
> >>> ERROR: date/time
Adrian Klaver wrote:
On Thursday 22 January 2009 8:16:46 am Alvaro Herrera wrote:
Grzegorz Jaśkiewicz escribió:
test2=# insert into dupa(a) select 'current_timestamp' from
generate_series(1,100);
ERROR: date/time value "current" is no longer supported
LINE 1: insert into dupa(a) select
On Thursday 22 January 2009 8:16:46 am Alvaro Herrera wrote:
> Grzegorz Jaśkiewicz escribió:
> > test2=# insert into dupa(a) select 'current_timestamp' from
> > generate_series(1,100);
> > ERROR: date/time value "current" is no longer supported
> > LINE 1: insert into dupa(a) select 'current_times
Grzegorz Jaśkiewicz escribió:
> test2=# insert into dupa(a) select 'current_timestamp' from
> generate_series(1,100);
> ERROR: date/time value "current" is no longer supported
> LINE 1: insert into dupa(a) select 'current_timestamp' from generate...
>^
> test2=
On 22/01/2009 13:52, Grzegorz Jaśkiewicz wrote:
> test2=# insert into dupa(a) select 'current_timestamp' from
> generate_series(1,100);
> ERROR: date/time value "current" is no longer supported
This doesn't answer your question, but you use current_timestamp without
the quotes, thus -
insert
test2=# create table dupa(a timestamp, b serial);
NOTICE: CREATE TABLE will create implicit sequence "dupa_b_seq" for
serial column "dupa.b"
CREATE TABLE
test2=# insert into dupa(a) select current_timestamp from
generate_series(1,100);
INSERT 0 100
test2=# insert into dupa(a) select 'current_ti
13 matches
Mail list logo