Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hLP1X-0006Ap-Df for pgsql-general@arkaria.postgresql.org; Tue, 30 Apr 2019 09:26:03 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hLP0X-0005SV-50 for pgsql-general@arkaria.postgresql.org; Tue, 30 Apr 2019 09:25:01 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hLP0W-0005SO-SL for pgsql-general@lists.postgresql.org; Tue, 30 Apr 2019 09:25:00 +0000 Received: from mout.kundenserver.de ([217.72.192.74]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hLP0U-0001Zs-J7 for pgsql-general@lists.postgresql.org; Tue, 30 Apr 2019 09:25:00 +0000 Received: from [10.8.0.101] ([185.40.248.10]) by mrelayeu.kundenserver.de (mreue107 [212.227.15.145]) with ESMTPSA (Nemesis) id 1MowbA-1gz10w2C2Y-00qUqq for ; Tue, 30 Apr 2019 11:24:56 +0200 Subject: Re: ERROR: operator does not exist: timestamp without time zone + integer To: pgsql-general@lists.postgresql.org Newsgroups: gmane.comp.db.postgresql.general References: From: Thomas Kellerer Message-ID: <12869367-4dae-37ee-0a2e-c94d04fc9427@gmx.net> Date: Tue, 30 Apr 2019 11:24:55 +0200 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.23) Gecko/20090812 Thunderbird/2.0.0.23 Mnenhy/0.7.6.666 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: de-DE Content-Transfer-Encoding: 8bit X-Provags-ID: V03:K1:OEM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id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Daulat Ram schrieb am 30.04.2019 um 05:46: > We are getting an ERROR: “operator does not exist: timestamp without > time zone + integer “ while creating table in postgres. The same > script is working fine in Oracle, I know there are some changes in > postgres but I am unable to identify . Please suggest how we can > create it successfully in postgres. > > > kbdb=# CREATE TABLE motif_site ( > kbdb(#         topic_match_conf_threshold bigint DEFAULT 3, > kbdb(#         retention_period bigint DEFAULT 3, > kbdb(#         site_mode_date timestamp NOT NULL DEFAULT date_trunc('day', LOCALTIMESTAMP)+7, > kbdb(#         reload_submission_date timestamp, > kbdb(#         socket_time_out bigint DEFAULT 2500, > kbdb(#         reload_date timestamp, > kbdb(#         marked_content_tag varchar(1024) DEFAULT 'pagecontent konabody intellitxt echotopic contentpaneopen postbody realtext newscontent content contentbody posttext##post_message_.*', > kbdb(#         crawl_batch_size_lower_limit numeric(38) NOT NULL DEFAULT 20, > kbdb(#         site_name varchar(512) NOT NULL, > kbdb(#         crawl_batch_size_upper_limit numeric(38) NOT NULL DEFAULT 40, > kbdb(#         mtg numeric(38) DEFAULT 2000, > kbdb(#         enabled numeric(38) NOT NULL DEFAULT 0, > kbdb(#         root_url varchar(1024), > kbdb(#         blocked_content_tag varchar(1024) DEFAULT 'nointellitxt noechotopic', > kbdb(#         match_params varchar(1024), > kbdb(#         tf_data_source varchar(256) DEFAULT 'Web', > kbdb(#         site_id numeric(38) NOT NULL > kbdb(# ) ; > ERROR:  operator does not exist: timestamp without time zone + integer > HINT:  No operator matches the given name and argument types. You might need to add explicit type casts. You can only add integers to DATEs, not to timestamps. To add a number of days to a timestamp, you need to use an interval: date_trunc('day', LOCALTIMESTAMP) + interval '7 day' Thomas