Re: [GENERAL] When starting postgres, it hangs like it is still connected to stdout

2014-01-07 Thread Joe Van Dyk
On Tue, Jan 7, 2014 at 11:47 AM, Susan Cassidy < susan.cass...@decisionsciencescorp.com> wrote: > When I start postgres using postgres -D $PGDATA, it hangs, and I see that > postgres and all the other attendant processes are running, but I never get > my prompt back. > > If I hit ctl/C, postgres e

Re: [GENERAL] Is there a way to return "true"/"false" string for boolean type?

2014-01-07 Thread Joe Van Dyk
On Tue, Jan 7, 2014 at 10:11 AM, ChoonSoo Park wrote: > Hello Gurus, > > I have several tables with lots of boolean columns. > When I run select query for the tables, I always get 't' or 'f' for > boolean types. > > Is there a way to return 'true' or 'false' string for boolean type except > using

[GENERAL] roles inheriting configuration values

2014-02-07 Thread Joe Van Dyk
I'd like to have join_collapse_limit=20 for all users that belong to a certain group. Is there a way to do that without having to alter all the roles that are in that group? $ psql monkey psql (9.3.1) Type "help" for help. monkey=# create user f1 login; CREATE ROLE monkey=# create user f2 in role

[GENERAL] can't cast hstore to json

2014-03-13 Thread Joe Van Dyk
son(array[hstore('a', 'b')]); array_to_json -- ["\"a\"=>\"b\""] (1 row) (I expected [{"a": "b"}] ) I don't get this on other postgresql installations. Any ideas? Joe

Re: [GENERAL] can't cast hstore to json

2014-03-13 Thread Joe Van Dyk
On Thu, Mar 13, 2014 at 12:15 PM, Joe Van Dyk wrote: > I've got a postgresql 9.3.2 server, compiled from scratch. Getting this > error: > > # select hstore('a', 'b')::json; > ERROR: cannot cast type hstore to json

Re: [GENERAL] SSD Drives

2014-04-03 Thread Joe Van Dyk
On Wed, Apr 2, 2014 at 12:37 PM, Bret Stern < bret_st...@machinemanagement.com> wrote: > Any opinions/comments on using SSD drives with postgresql? > Related, anyone have any thoughts on using postgresql on Amazon's EC2 SSDs? Been looking at http://aws.amazon.com/about-aws/whats-new/2013/12/19/a

[GENERAL] Adding a not null constraint faster

2014-05-17 Thread Joe Van Dyk
hout any significant downtime involves creating a new table, as I understand it. Joe -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

[GENERAL] row_to_json question

2012-06-23 Thread Joe Van Dyk
How can I use row_to_json for a subset of columns in a row? (without creating a new view or using a CTE?) What I want returned: {"email_address":"j...@tanga.com","username":"joevandyk"} Note that there is no "id" column in the result. create table users (id serial primary key, email_address varc

Re: [GENERAL] row_to_json question

2012-06-23 Thread Joe Van Dyk
On Sat, Jun 23, 2012 at 3:03 PM, Joe Van Dyk wrote: > How can I use row_to_json for a subset of columns in a row? (without > creating a new view or using a CTE?) > > What I want returned: > {"email_address":"j...@tanga.com","username":"joevandyk&q

[GENERAL] Fetching json: best way to do this?

2012-09-23 Thread Joe Van Dyk
product_medias m on m.media_of_id = products.id left join channels_products cp on cp.product_id = products.id join channels c on c.id = cp.channel_id where products.id = $1 group by products.id $$; select product_listing_json(id) from products order by id desc; (https://gist.github.com/377

[GENERAL] Shorthand syntax for triggers

2012-10-10 Thread Joe Van Dyk
Instead of this: create function some_trigger() returns trigger as $$ begin if TG_OP = 'DELETE' then insert into audits values (OLD.value); else insert into audits values (NEW.value); end if; return NULL; end $$ language plpgsql; create trigger some_trigger after insert on products fo

[GENERAL] alter view foo set () -- fixed in 9.2 stable, but when will it be released?

2012-11-02 Thread Joe Van Dyk
I'm running into this bug fixed a few days after 9.2.1 was released: http://git.postgresql.org/gitweb/?p=postgresql.git;a=commitdiff;h=d2292f6405670e1fdac13998f87b4348c71fb9e6 Anyone know when 9.2.2 will go out? Thanks, Joe

[GENERAL] PITR manual doesn't reference pg_receivexlog?

2012-11-19 Thread Joe Van Dyk
http://www.postgresql.org/docs/current/static/continuous-archiving.htmldoesn't mention pg_receivexlog. But http://www.postgresql.org/docs/current/static/app-pgreceivexlog.htmlsays pg_receivexlog can be used for PITR backups. Should the PITR page reference pg_receivexlog?

[GENERAL] Quickly making a column non-nullable (without a table scan)

2012-12-14 Thread Joe Van Dyk
Hi, I have an index on a column that can be nullable. I decide the column shouldn't be nullable anymore. So I alter the column to be not nullable. That "alter column" query does a full table scan, which can be painful for large tables. Couldn't that index be used i

Re: [GENERAL] [ADMIN] Postgresql Database Lock Problem

2009-11-17 Thread Plugge, Joe R.
Can you provide the layout of your table and all indexes that are present on said table? Sounds like a incorrectly indexed table possibly. -Original Message- From: pgsql-admin-ow...@postgresql.org [mailto:pgsql-admin-ow...@postgresql.org] On Behalf Of shohorab hossain Sent: Tuesday, Nov

Re: [GENERAL] Query is stuck

2010-04-13 Thread Plugge, Joe R.
What do you get when you run this? select * from pg_stat_activity where waiting='t'; From: pgsql-admin-ow...@postgresql.org [mailto:pgsql-admin-ow...@postgresql.org] On Behalf Of Satish Burnwal (sburnwal) Sent: Tuesday, April 13, 2010 7:58 AM To: pgsql-general@postgresql.org Cc: pgsql-ad...@po

Re: [GENERAL] Query is stuck

2010-04-13 Thread Plugge, Joe R.
What version of postgres are you on? From: Satish Burnwal (sburnwal) [mailto:sburn...@cisco.com] Sent: Tuesday, April 13, 2010 8:04 AM To: Plugge, Joe R.; pgsql-general@postgresql.org Cc: pgsql-ad...@postgresql.org Subject: RE: Query is stuck controlsmartdb=# select * from pg_stat_activity where

[GENERAL] PostgreSQL 7 on Redhat 6.1

2001-01-26 Thread Chean Fonk Joe Thong
with no deps, when starting the postgresql server with the following command: /rc.d/init.d/postgresql start The script told me that I've an old version of PostgreSQL. How should I solve this problem? How do I install GLIBC 2.2 onto my Redhat? Any help would be much appre

<    1   2   3   4   5   6