Re: [SQL]

2013-10-08 Thread Plugge, Joe R.
1 - why two databases? Couldn't you have just created two separate SCHEMAS? 2 - if you insist on two separate databases: http://www.postgresql.org/docs/9.2/static/dblink.html From: pgsql-sql-ow...@postgresql.org [mailto:pgsql-sql-ow...@postgresql.org] On Behalf Of Kaleeswaran Velu Sent:

Re: [SQL] When To Use Quotes

2012-01-05 Thread Plugge, Joe R.
Should match to the data type of the filtered value, so CHAR,VARCHAR,All DATE TYPES should be quoted. INTEGER, BIGINT, SMALLINT should not -Original Message- From: pgsql-sql-ow...@postgresql.org [mailto:pgsql-sql-ow...@postgresql.org] On Behalf Of Carlos Mennens Sent: Thursday,

Re: [SQL] Compare two Data bases Structure

2011-02-23 Thread Plugge, Joe R.
Check out DB Solo ... http://www.dbsolo.com/ Does both DDL compare as well as data compare. From: pgsql-sql-ow...@postgresql.org [pgsql-sql-ow...@postgresql.org] On Behalf Of manuel antonio ochoa [manuel8aalf...@gmail.com] Sent: Wednesday, February 23, 2011

Re: [SQL] Union Question

2010-12-03 Thread Plugge, Joe R.
You may want to try dblink. http://www.postgresql.org/docs/current/static/dblink.html From: pgsql-sql-ow...@postgresql.org [mailto:pgsql-sql-ow...@postgresql.org] On Behalf Of Shaun McCloud Sent: Friday, December 03, 2010 10:51 AM To: pgsql-sql@postgresql.org Subject: [SQL] Union Question

Re: [SQL] how to construct sql

2010-06-02 Thread Plugge, Joe R.
This is discussed in this Wiki: http://wiki.postgresql.org/wiki/Grouping_Sets -Original Message- From: pgsql-sql-ow...@postgresql.org [mailto:pgsql-sql-ow...@postgresql.org] On Behalf Of Hiltibidal, Rob Sent: Wednesday, June 02, 2010 12:06 PM To: Oliveiros; Wes James;

[SQL] Column Specific Update Trigger Routine

2010-05-06 Thread Plugge, Joe R.
I am trying to create a update trigger on a table that basically will only fire when a specific column is updated. I am using version 8.4.3. My plan of attack was to always fire on any row update, and pass in the OLD and NEW column that I want to check. CREATE TRIGGER check_lockout AFTER

Re: [SQL] Column Specific Update Trigger Routine

2010-05-06 Thread Plugge, Joe R.
Nevermind all, I figured it out Thanks Dmitriy ... From: Dmitriy Igrishin [mailto:dmit...@gmail.com] Sent: Thursday, May 06, 2010 3:25 PM To: Plugge, Joe R. Subject: Re: [SQL] Column Specific Update Trigger Routine Hey Plugge, You dont need to pass OLD.* or NEW.* to the trigger function

Re: [SQL] Column Specific Update Trigger Routine

2010-05-06 Thread Plugge, Joe R.
and ownerid = OLD.ownerid; RETURN NEW; END IF; RETURN NULL; -- result is ignored since this is an AFTER trigger END; $$; Thanks !! From: Justin Graf [mailto:jus...@magwerks.com] Sent: Thursday, May 06, 2010 3:59 PM To: Plugge, Joe R.; pgsql-sql@postgresql.org Subject

Re: [SQL] understanding select into

2010-04-09 Thread Plugge, Joe R.
Johnf, I would think that the _p, _test, _r etc are local variables within the procedure/function and this is the way that the value (from the select) gets assigned to that local variable. -Original Message- From: pgsql-sql-ow...@postgresql.org

Re: [SQL] Simple aggregate query brain fart

2010-03-18 Thread Plugge, Joe R.
Mark, Change your query to this: SELECT id, count(*) FROM mytable GROUP BY id HAVING count(*) 2; -Original Message- From: pgsql-sql-ow...@postgresql.org [mailto:pgsql-sql-ow...@postgresql.org] On Behalf Of Mark Fenbers Sent: Thursday, March 18, 2010 10:07 AM To:

Re: [SQL] PostgreSQL Active-Active Configuration

2010-03-05 Thread Plugge, Joe R.
You may want to try Bucardo ... By performance, are you referring to latency? If so, bandwidth between sites typically is the factor with latency in any replication solution. http://bucardo.org/ -Original Message- From: pgsql-sql-ow...@postgresql.org

[SQL] Function Syntax Help

2009-10-30 Thread Plugge, Joe R.
I am trying to create a function that will grind through a cdr table and populate another table. I am trying to load the function and am getting the following error: ERROR: function result type must be specified CREATE FUNCTION gen_simultaneous_calls(mystart timestamp, mystop timestamp)

Re: [SQL] Function Syntax Help

2009-10-30 Thread Plugge, Joe R.
To: Plugge, Joe R. Cc: pgsql-sql@postgresql.org Subject: Re: [SQL] Function Syntax Help 2009/10/30 Plugge, Joe R. jrplu...@west.commailto:jrplu...@west.com I am trying to create a function that will grind through a cdr table and populate another table. I am trying to load the function and am getting

Re: [SQL] Function Syntax Help

2009-10-30 Thread Plugge, Joe R.
:= newstop + INTERVAL '1 minute'; END LOOP; END; $$ LANGUAGE 'plpgsql' VOLATILE; From: epai...@googlemail.com [mailto:epai...@googlemail.com] On Behalf Of Brian Modra Sent: Friday, October 30, 2009 2:46 PM To: Plugge, Joe R. Cc: pgsql-sql@postgresql.org Subject: Re: [SQL] Function Syntax Help