Re: [SQL] Migration from SQLite Help (Left Join)

2007-07-30 Thread Tom Lane
=?ISO-8859-1?Q?Nis_J=F8rgensen?= <[EMAIL PROTECTED]> writes: > The problem seems to be that you expect > SELECT a > FROM b,c LEFT JOIN d > to be interpreted as > SELECT a > FROM (b CROSS JOIN c) LEFT JOIN d The depressing part of this report is that it sounds like sqlite has emulated this bit o

Re: [SQL] [NOVICE] alter table table add column

2007-07-30 Thread Michael Glaesemann
[Please don't post the same question to many lists. Choose one. If you're unsure if it's the correct list for your question, ask if there's a more appropriate one. This question is find for -novice or - general. Thanks.] On Jul 30, 2007, at 23:19 , Ronald Rojas wrote: And, I want to add the

[SQL] alter table table add column

2007-07-30 Thread Ronald Rojas
Hi, Anybody knows how to add column with reference to BEFORE or AFTER any given column? Let say here's my table structure: Column | Type| Modifiers --+---+--- surname | character varying | lastname | character varying | address | character

Re: [SQL] Table-name as parameter to plpgsql

2007-07-30 Thread Milen A. Radev
Andreas Joseph Krogh написа: The following function failes to compile: CREATE OR REPLACE FUNCTION test_func(p_table_name VARCHAR) RETURNS VOID AS $$ BEGIN INSERT INTO p_table_name(some_field) VALUES('some_value'); END; $$ LANGUAGE plpgsql; Gives: ERROR: syntax error at or near "$1" LINE 1:

Re: [SQL] Connection Limit

2007-07-30 Thread Scott Marlowe
On 7/30/07, Jon Horsman <[EMAIL PROTECTED]> wrote: > Hello, > > I have a server running postgres 7.4.13 and am starting to see errors > "FATAL: connection limit exceeded for non-superusers". > > I'm not sure which one of my applications are hogging all of the > connections, is there a way debug th

[SQL] Table-name as parameter to plpgsql

2007-07-30 Thread Andreas Joseph Krogh
The following function failes to compile: CREATE OR REPLACE FUNCTION test_func(p_table_name VARCHAR) RETURNS VOID AS $$ BEGIN INSERT INTO p_table_name(some_field) VALUES('some_value'); END; $$ LANGUAGE plpgsql; Gives: ERROR: syntax error at or near "$1" LINE 1: INSERT INTO $1 (some_field) V

Re: [SQL] Connection Limit

2007-07-30 Thread Andrew Sullivan
On Mon, Jul 30, 2007 at 05:41:51PM -0400, Jon Horsman wrote: > > I have a few processes that are running with host = 127.0.0.1 and then > about 90% of all the processes are running as [local]. What does > [local] mean, since in fact 127.0.0.1 is obviously local, how do they > differ? I _believe_

Re: [SQL] Connection Limit

2007-07-30 Thread Jon Horsman
I have another related question when running ps -fax i see the following 7476 ?S 0:00 | \_ postgres: mobileuser mobileextension [local] idle 8046 ?S 0:00 | \_ postgres: mobileuser mobileextension 127.0.0.1 idle I have a few processes that are running wi

[SQL] Connection Limit

2007-07-30 Thread Jon Horsman
Hello, I have a server running postgres 7.4.13 and am starting to see errors "FATAL: connection limit exceeded for non-superusers". I'm not sure which one of my applications are hogging all of the connections, is there a way debug this somehow? Thanks, Jon. ---(end of

Re: [SQL] Tunning PostgreSQL performance for views on Windows

2007-07-30 Thread Lewis Cunningham
How big are the underlying tables? If they are large, are you partitioning? Since the values only change daily, if the end result is a reasonable size, have you considered using a CTAS rather than views? LewisC --- Ranieri Mazili <[EMAIL PROTECTED]> wrote: > Hello, > > I'm developing a BI and

[SQL] hi

2007-07-30 Thread Penchalaiah P.
I want to fix the pay based on joining date and antedate...antedate is the last date... Joining date is 01-07-2007 Antedate is 04-07-2005.. On joining date I will fix the pay but before fixing the pay I will check whether antedate is there or not, if its there then I will see difference be

Re: [SQL] raise exception and transaction handling

2007-07-30 Thread Bart Degryse
Alternative that always works no matter how many raise exceptions there are: Create a (perlu) function that opens a second connection to your database and does the insert into m_proba. Since this is a seperate connection, it's also a seperate transaction and thus not rolled back by your "main" tr