[GENERAL] unnesting hstore data

2015-10-31 Thread patrick keshishian
Hi, I'm new to hstore type and I couldn't figure out how to use each(hstore) so I am using akeys() and avals() along with unnest(). Here is a simple example: db=> CREATE TABLE pktest (id int8 PRIMARY KEY, tags hstore) ; CREATE TABLE db=> INSERT INTO pktest VALUES (1, '"key 1"=>"value 1","key 2"

Re: [GENERAL] pg_query_params() problem with date_trunc() (possibly other functions as well)

2014-05-16 Thread patrick keshishian
On 5/16/14, Tom Lane wrote: > patrick keshishian writes: >> I started to look into using pg_query_params() with some >> php scripts, but ran into this issue where I get: > >> PHP message: PHP Warning: pg_query_params(): Query failed: ERROR: >> invalid input

[GENERAL] pg_query_params() problem with date_trunc() (possibly other functions as well)

2014-05-16 Thread patrick keshishian
Hi list, My google skills are very poor, so excuse me if this is documented some place I'm failing to find. I started to look into using pg_query_params() with some php scripts, but ran into this issue where I get: PHP message: PHP Warning: pg_query_params(): Query failed: ERROR: invalid input s

Re: [GENERAL] Call for design: PostgreSQL mugs

2014-01-30 Thread patrick keshishian
On 9/10/13, Alban Hertroys wrote: > On 10 September 2013 15:09, Vincent Veyron wrote: > >> Le lundi 09 septembre 2013 à 14:17 -0700, John R Pierce a écrit : >> > On 9/9/2013 2:07 PM, Basil Bourque wrote: >> >> > > >> > > --> Lift the rounded-corner blue bar off the top of the >> > > PostgreSQL.or

Re: [GENERAL] Call for design: PostgreSQL mugs

2013-09-10 Thread patrick keshishian
f a certain other mammal under this cup! ;) a DIY mod if you will. On 9/9/13, patrick keshishian wrote: > On 9/3/13, Andreas 'ads' Scherbaum wrote: >> >> PostgreSQL folks! >> >> We are looking for the next big thing. Actually, it's a bit smaller

Re: [GENERAL] Call for design: PostgreSQL mugs

2013-09-09 Thread patrick keshishian
On Monday, September 9, 2013, Gavin Flower wrote: > > On 10/09/13 13:21, John R Pierce wrote: >> >> On 9/9/2013 5:39 PM, Sam Hahn wrote: >>> >>> How about >>> "Postgres -the Linux of Data"  (or) >>> "The Linux of DBs" >> >> >> >> ugh no.    if anything, Mysql is the Linux of data. PostgreSQL is

Re: [GENERAL] Call for design: PostgreSQL mugs

2013-09-09 Thread patrick keshishian
On 9/9/13, John R Pierce wrote: > On 9/9/2013 1:22 PM, patrick keshishian wrote: >> If printing inside the mug is too difficult, cost prohibitive, then stick >> with the smiling elephant at the outside bottom of the mug. > > > as I rarely see mugs with anything printed

Re: [GENERAL] Call for design: PostgreSQL mugs

2013-09-09 Thread patrick keshishian
On 9/3/13, Andreas 'ads' Scherbaum wrote: > > PostgreSQL folks! > > We are looking for the next big thing. Actually, it's a bit smaller: a > new design for mugs. So far we had big blue elephants, small blue > elephants, frosty elephants, white SQL code on black mugs ... Now it's > time to design s

Re: [pgeu-general] [GENERAL] Call for design: PostgreSQL mugs

2013-09-05 Thread patrick keshishian
Here is an idea, but not sure how well it'll be accepted. Inside the cup, names of current/active developers/contributors, represented using tag/keyword cloud[1] form. Using a combination of code check-in count and importance of check-in, contributions on mailing lists, other factors to make it fa

Re: [pgeu-general] [GENERAL] Call for design: PostgreSQL mugs

2013-09-04 Thread patrick keshishian
On 9/4/13, Andreas 'ads' Scherbaum wrote: > On 09/04/2013 10:17 PM, Stefan Kaltenbrunner wrote: >> On 09/04/2013 10:13 PM, Marc Balmer wrote: >>> Am 04.09.13 22:02, schrieb Gavin Flower: On 04/09/13 22:47, Eduardo Morras wrote: > On Wed, 04 Sep 2013 00:08:52 +0200 > Andreas 'ads' Sche

Re: [GENERAL] Terminate query on page exit

2013-02-19 Thread patrick keshishian
On Tuesday, February 19, 2013, Albe Laurenz wrote: > david harel wrote: > > I use postgresql on a Linux server on a virtual machine (despite my > protest to IT personal). > > The client is typically a web server implementing PHP sites. > > > > Customers many times close a page typically when a hea

Re: [GENERAL] Running update in chunks?

2013-01-21 Thread patrick keshishian
On Mon, Jan 21, 2013 at 1:48 PM, Tim Uckun wrote: >> I'd be curious to see results of the same "update" on a standard HDD >> vs the SSD, and maybe on a more typical database deployment hardware >> vs a macbook air. >> > > > I haven't tried it on any other machine yet. CREATE TEMP TABLE tt as > SE

Re: [GENERAL] Running update in chunks?

2013-01-21 Thread patrick keshishian
On Mon, Jan 21, 2013 at 1:23 PM, Richard Huxton wrote: > On 21/01/13 20:09, Tim Uckun wrote: >> >> Just to close this up and give some guidance to future googlers... > > Careful, future googlers. > >> Conclusion. Updates on postgres are slow > > Nope. > > >> (given the default >> postgresql.conf)

Re: [GENERAL] non-static LIKE patterns

2012-04-11 Thread patrick keshishian
On Wed, Apr 11, 2012 at 4:07 PM, Tom Lane wrote: > patrick keshishian writes: >> I need to match entries in second table to the first, so I use the >> following in my WHERE clause: >>       ... WHERE second.path LIKE first.path||'%' >> This seemed to work at

[GENERAL] non-static LIKE patterns

2012-04-11 Thread patrick keshishian
Hi all, I'm sure this has been discussed before, but I am not too sure what key search-terms to use to find any potentially relevant discussions. Issue: I have two tables, each has a column that contains a directory path. First table contains a starting path and the second holds sub-paths (retain

Re: [GENERAL] FATAL: the database system is starting up

2011-11-07 Thread patrick keshishian
On Tue, Nov 1, 2011 at 5:43 AM, patrick keshishian wrote: > On Wed, Oct 26, 2011 at 5:46 PM, Scott Marlowe > wrote: >> On Wed, Oct 26, 2011 at 6:09 PM, patrick keshishian >> wrote: >>> On Wed, Oct 26, 2011 at 4:49 PM, William E. Moreno A. >

Re: [GENERAL] FATAL: the database system is starting up

2011-11-01 Thread patrick keshishian
On Wed, Oct 26, 2011 at 5:46 PM, Scott Marlowe wrote: > On Wed, Oct 26, 2011 at 6:09 PM, patrick keshishian > wrote: >> On Wed, Oct 26, 2011 at 4:49 PM, William E. Moreno A. >> wrote: >>> Solution: http://archives.postgresql.org/pgsql-general/2007-12/msg01339.p

Re: [GENERAL] FATAL: the database system is starting up

2011-10-26 Thread patrick keshishian
On Wed, Oct 26, 2011 at 4:49 PM, William E. Moreno A. wrote: > Solution: http://archives.postgresql.org/pgsql-general/2007-12/msg01339.php > Solution: Message-id: <476d6de1.4050...@latnet.lv> > > > Problem: FATAL:  the database system is starting up > > Solved:   change postgresql_flags in /etc/r

Re: [GENERAL] psql with option -c fails..

2011-09-21 Thread patrick keshishian
On Wed, Sep 21, 2011 at 7:54 AM, akp geek wrote: > Hi all - >                I am trying to run the psql command the following way and > it's failing . Can you please help? >                 psql  -d mydb  -c 'update tb_user set accountstatus='A' > where userid=123' > ERROR:  column "a" does not e

Re: [GENERAL] Dynamic constraint names in ALTER TABLE

2011-09-20 Thread patrick keshishian
On Tue, Sep 20, 2011 at 7:36 AM, Adrian Klaver wrote: > On Monday, September 19, 2011 8:09:04 pm patrick keshishian wrote: >> On Mon, Sep 19, 2011 at 6:08 PM, Adrian Klaver > wrote: >> > On Monday, September 19, 2011 5:10:45 pm patrick keshishian wrote: >> >> Hi,

Re: [GENERAL] Dynamic constraint names in ALTER TABLE

2011-09-19 Thread patrick keshishian
On Mon, Sep 19, 2011 at 8:34 PM, Tom Lane wrote: > patrick keshishian writes: >> The question wasn't where does one find the name of the constraint. My >> example demonstrated that I knew how to get that value. The question, >> however, is how do you get that i

Re: [GENERAL] Dynamic constraint names in ALTER TABLE

2011-09-19 Thread patrick keshishian
2011/9/19 Ondrej Ivanič : > Hi, > > On 20 September 2011 13:09, patrick keshishian wrote: >> e.g., ALTER TABLE sales DROP CONSTRAINT (SELECT conname FROM >> pg_constraint JOIN pg_class ON (conrelid=pg_class.oid) WHERE >> pg_class.relname='sales' AND conkey[1

Re: [GENERAL] Dynamic constraint names in ALTER TABLE

2011-09-19 Thread patrick keshishian
On Mon, Sep 19, 2011 at 6:08 PM, Adrian Klaver wrote: > On Monday, September 19, 2011 5:10:45 pm patrick keshishian wrote: >> Hi, >> >> Is there any way the .sql scripts could make use of this query to get >> the foreign key name from pg_constraint table, regardless of

[GENERAL] Dynamic constraint names in ALTER TABLE

2011-09-19 Thread patrick keshishian
Hi, Where I work, we have a large deployment of software using PostgreSQL database. We have been stuck on version 7.4.16 for a while now. I am about to switch us to a 9.0.x. One problem I'm running into, and I am hoping you can help me with, given the constraints I have to work with, is our conve

Re: [GENERAL]

2001-10-16 Thread patrick keshishian
ansaction in progress. > > Same happens with commit. > We are used to SQL PlUS > > Without these facilities we really cannot go ahead with postgres db. Could you >please help us out on this. -- patrick keshishian Gnu __ _ -o)/ / (_)__ __ __

[GENERAL] re: 7.1.2 and foreign key unique constraint.

2001-08-02 Thread patrick keshishian
ion for a foreign key is that it has to be unique itself. Thanks for your time, -- patrick keshishian Gnu __ _ -o)/ / (_)__ __ __ /\\ /__/ / _ \/ // /\ \/ / _\_v __/_/_//_/\_,_/ /_/\_\ ---(end of broadcast)--- TIP 2: you