From: Ravi Tammineni <RTammineni@jackhenry.com>
To: pgsql-admin@postgresql.org <pgsql-admin@postgresql.org>
Subject: PostgreSQL-11 partition creation issue
Date: Fri, 7 Aug 2020 14:49:09 +0000
Message-ID: <F88AD378-F50D-4FEC-BEF0-581D3E60FDDE@jackhenry.com> (raw)
In-Reply-To: <A78FBB99-51B6-4B12-B5F8-9073EF872BB0@jackhenry.com>
References: <A78FBB99-51B6-4B12-B5F8-9073EF872BB0@jackhenry.com>
Hi,
I am trying to create a partition table for UNIX epoch column. Here are the details of the table. Our application is converting the date and storing the date in UNIX epoch time format.
CREATE TABLE public.oauth_server_nonce_new (
osn_id integer NOT NULL,
osn_consumer_key character varying(64) NOT NULL,
osn_token character varying(64) NOT NULL,
osn_timestamp bigint NOT NULL,
osn_nonce character varying(80) NOT NULL
) partition by to_timestamp(osn_timestamp/1000)::date;
CREATE TABLE measurement_y2016 PARTITION OF oauth_server_nonce_new FOR VALUES FROM ('2020-07-01') TO ('2020-08-01');
CREATE TABLE measurement_y2017 PARTITION OF oauth_server_nonce_new FOR VALUES FROM ('2020-08-01') TO ('2020-09-01');
Getting the following error.
ERROR: syntax error at or near "/"
LINE 7: ) partition by to_timestamp(osn_timestamp/1000)::date;
Any help is appreciated.
Regards,
Ravi
NOTICE: This electronic mail message and any files transmitted with it are intended
exclusively for the individual or entity to which it is addressed. The message,
together with any attachment, may contain confidential and/or privileged information.
Any unauthorized review, use, printing, saving, copying, disclosure or distribution
is strictly prohibited. If you have received this message in error, please
immediately advise the sender by reply email and delete all copies.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-admin@postgresql.org
Cc: RTammineni@jackhenry.com
Subject: Re: PostgreSQL-11 partition creation issue
In-Reply-To: <F88AD378-F50D-4FEC-BEF0-581D3E60FDDE@jackhenry.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox