if you want see account_status and the count()- try this:
SELECT
CASE
WHEN AND c.regdate > EXTRACT(epoch FROM (now() - INTERVAL '14 day'))
THEN 'trial'
WHEN last_pay > EXTRACT(epoch FROM (now() - INTERVAL '37 day'))
THEN 'paying'
END as account_status,
2017-03-10 5:11 GMT+00:00 Adrian Klaver :
> On 03/09/2017 09:09 PM, Adrian Klaver wrote:
>
>> On 03/09/2017 03:55 AM, mac pack wrote:
>>
>>> Hi.
>>>
>>> My PostgreSQL server was affect by a Ransomware virus. I'm trying to
>>> restore the database from a dump file made by pg_dump in custom format
>
On Sat, Mar 11, 2017 at 12:15 AM, Adrian Klaver
wrote:
> Two resources that help me keep within shouting distance of the latest and
> greatest:
>
> Hubert 'depesz' Lubaczewski
> Waiting for PostgreSQL * series:
>
> https://www.depesz.com/
> In the search box type 'Waiting for'
>
> The pgsql-announ
On Fri, 10 Mar 2017, Adrian Klaver wrote:
That this looks like a merge of the sample file:
https://git.postgresql.org/gitweb/?p=postgresql.git;a=blob;f=src/backend/libpq/pg_hba.conf.sample;h=6b1778a72136edf52cea56f2ab088b9449df9a48;hb=HEAD
with your additions.
Seems you have not restarted Pos
On Fri, 10 Mar 2017, Tom Lane wrote:
The "@remove-line-for-nolocal@" bits should not be there. initdb would
normally either delete those lines entirely, or strip off
"@remove-line-for-nolocal@", depending on the switches it was given.
Likewise the various other @something@ bits should have been
On 03/10/2017 11:50 AM, Rich Shepard wrote:
On Fri, 10 Mar 2017, Rich Shepard wrote:
Actually, it has the modifications I've made over the years. That's why I
could not see what changed.
Well, postgres was running yesterday and allowed me to access my
bookkeeping software so obviously somet
Rich Shepard writes:
>Postgres runs on my desktop server/workstation and I'm the only user
> loggin in. Here's pg_hba.conf (restored from 2-22-2017 backup) which still
> does not work. I've read the pg_hba.conf section in the 9.6 docs without
> seeing what's wrong with my file.
> # PostgreSQL
On Fri, 10 Mar 2017, Rich Shepard wrote:
Actually, it has the modifications I've made over the years. That's why I
could not see what changed.
Well, postgres was running yesterday and allowed me to access my
bookkeeping software so obviously something did change without my manually
editing p
On Fri, 10 Mar 2017, Brian Dunavant wrote:
I believe the following test should answer your question.
Thank you, Brian. It does answer my question.
Regards,
Rich
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgres
On Fri, 10 Mar 2017, Tom Lane wrote:
It looks like what you have in pg_hba.conf is a raw copy of
pg_hba.conf.sample, without any of the editing that initdb normally
applies to it (to say nothing of manual adjustments you might make later).
Tom,
Actually, it has the modifications I've made o
I believe the following test should answer your question.
db=# create table test ( a integer not null unique );
CREATE TABLE
db=# insert into test values (1);
INSERT 0 1
db=# insert into test values (1);
ERROR: duplicate key value violates unique constraint "test_a_key"
DETAIL: Key (a)=(1) alr
Rich Shepard writes:
> postgres@salmo:~$ postgres -D /var/lib/pgsql/9.6/data/ &
> [1] 17585
> postgres@salmo:~$ LOG: could not open secondary authentication file
> "@authcomment@" as "/var/lib/pgsql/9.6/data/authcomment@": No such file or
> directory
> LOG: could not open secondary authenticatio
I'm filling a table with rows and have the first batch successfully
inserted. When I add more rows there may be some that already exist in the
table and I would prefer that they be ignored and the insert process
continue.
The syntax page for INSERT suggests that ON CONFLICT DO NOTHING is exac
I've tried resolving this but do not see what changed.
1. Shut down postgres:
pg_ctl stop -D /var/lib/pgsql/9.6/data
2. Upgraded version (using SlackBuilds.org package as usual).
3. Tried re-starting postgres:
postgres@salmo:~$ postgres -D /var/lib/pgsql/9.6/data/ &
[1] 17585
p
On 03/10/2017 07:08 AM, John Iliffe wrote:
On Friday 10 March 2017 09:25:25 Melvin Davidson wrote:
*Probably "PostgreSQL Administration Essentials" would be good to start
with.*
Thank you. I was unaware of this source.
I have a similar book but it is about 8 years old so probably out of dat
On Friday 10 March 2017 09:25:25 Melvin Davidson wrote:
> On Thu, Mar 9, 2017 at 10:01 PM, John Iliffe wrote:
> > On Thursday 09 March 2017 16:37:28 you wrote:
> > > On 03/08/2017 10:12 AM, John Iliffe wrote:
> > > > I think you may have hit it but I'm even more confused now.
> > > >
> > > > I lo
On 03/10/2017 01:25 AM, mac pack wrote:
2017-03-10 5:11 GMT+00:00 Adrian Klaver mailto:adrian.kla...@aklaver.com>>:
On 03/09/2017 09:09 PM, Adrian Klaver wrote:
On 03/09/2017 03:55 AM, mac pack wrote:
Hi.
My PostgreSQL server was affect by a Ransomware vir
On Thu, Mar 9, 2017 at 10:01 PM, John Iliffe wrote:
> On Thursday 09 March 2017 16:37:28 you wrote:
> > On 03/08/2017 10:12 AM, John Iliffe wrote:
> > > I think you may have hit it but I'm even more confused now.
> > >
> > > I looked at the running Postgesql on the current server and there is a
>
On Wed, Mar 8, 2017 at 6:30 AM, Mark Dilger wrote:
>
>> On Mar 7, 2017, at 12:24 PM, Mark Dilger wrote:
>>
>> Hello,
>>
>> I am attempting to get the tap tests working under windows so as to
>> help review patches for the 10.0 development cycle. I can compile
>> the sources on windows 2008 using
19 matches
Mail list logo