Re: [GENERAL] Get date timestamp(3) without time zone column - PGSQL 9.5
Try using double colon opperator instead of cast(). E. g. task_start::date Regards, Amul Sent from a mobile device. Please excuse brevity and tpyos. On Mon, 5 Sep, 2016 at 8:29 am, Patrick Baker [via PostgreSQL] wrote: Hi guys, I got the tasks table that has the tasks_start column: tasks_start | timestamp(3) without time zone select tasks_start from tasks LIMIT 1; tasks_start --- 2016-08-10 00:30:00 I'm trying to cast the date, using this query: SELECT cast(tasks_start as date) FROM "jobs" WHERE "tasks"."deleted" = 'f' AND "tasks"."recurrence_id" = 1 AND (Date(tasks_start) in ('2016-08-10') but it doesn't work.. I get 0 rows... what am I doing wrong? cheersPatrick If you reply to this email, your message will be added to the discussion below: http://postgresql.nabble.com/Get-date-timestamp-3-without-time-zone-column-PGSQL-9-5-tp5919421.html To start a new topic under PostgreSQL - general, email ml-node+s1045698n1843780...@n3.nabble.com To unsubscribe from PostgreSQL - general, click here. NAML -- View this message in context: http://postgresql.nabble.com/Get-date-timestamp-3-without-time-zone-column-PGSQL-9-5-tp5919421p5919430.html Sent from the PostgreSQL - general mailing list archive at Nabble.com.
Re: [GENERAL] Alternate or Optimization for with hold cursor
Not sure what you trying to achieve, you could give a try for Materialized Views[1], see would this help you or not. 1. http://www.postgresql.org/docs/9.3/static/rules-materializedviews.html 2. http://www.postgresql.org/docs/9.3/static/sql-creatematerializedview.html Regards, Amul Sul -- View this message in context: http://postgresql.nabble.com/Alternate-or-Optimization-for-with-hold-cursor-tp5903211p5903233.html Sent from the PostgreSQL - general mailing list archive at Nabble.com. -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general
Re: [GENERAL] excute function before DROP EXTENSION
Hi Beena, How about using *TWO* extension? 1. ext_install 2. ext_uninstall Let me explain, 1. ext_uninstall will contain two command, A] SQL calling to cleanup function B] DROP EXTENSION ext_install 2. ext_install will have DROP EXTENSION IF EXISTS ext_install (cycle of install/uninstall) other wise you may not able to create ext_install again & other command. it wont sound good, but AFAICS no other option. Thoughts? Comments? Regards, Amul Sul -- View this message in context: http://postgresql.1045698.n5.nabble.com/excute-function-before-DROP-EXTENSION-tp5758279p5792350.html Sent from the PostgreSQL - general mailing list archive at Nabble.com. -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general
[GENERAL] Re: How to do incremental / differential backup every hour in Postgres 9.1?
>5. should I use the --xlog parameter and if so do I need to change wal_keep_segments from 0? you have already use --xlog as -x in your above command of pg_basebackup . yes it better to change wal_keep_segments, if you want start a postmaster directly in the extracted directory without the need to consult the log archive, thus making this a completely standalone backup. Regards, Amul Sul -- View this message in context: http://postgresql.1045698.n5.nabble.com/How-to-do-incremental-differential-backup-every-hour-in-Postgres-9-1-tp5765208p5765249.html Sent from the PostgreSQL - general mailing list archive at Nabble.com. -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general