Re: [HACKERS] [SQL] Case Preservation disregarding case

2006-12-01 Thread Ken Johanson
Chuck McDevitt wrote: At Teradata, we certainly interpreted the spec to allow case-preserving, but case-insensitive, identifiers. Users really liked it that way My 2 thoughts: 1: It seems like this behavior of case sensitive-or-not-identifiers could/should be a config option -- either globall

Re: [SQL] Tracking Down Error in Stored Procedure

2006-12-01 Thread Aaron Bono
On 12/2/06, Tom Lane <[EMAIL PROTECTED]> wrote: "Aaron Bono" <[EMAIL PROTECTED]> writes: > CONTEXT: PL/pgSQL function "update_web_site_hits_fn" line 200 at execute > statement > My question is this: What is line 200? Is it the 200th line after the > CREATE part of the stored procedure? Or i

Re: [SQL] Tracking Down Error in Stored Procedure

2006-12-01 Thread Tom Lane
"Aaron Bono" <[EMAIL PROTECTED]> writes: > CONTEXT: PL/pgSQL function "update_web_site_hits_fn" line 200 at execute > statement > My question is this: What is line 200? Is it the 200th line after the > CREATE part of the stored procedure? Or is it the 200th line after the > BEGIN? Or maybe so

[SQL] Tracking Down Error in Stored Procedure

2006-12-01 Thread Aaron Bono
I have a nightly batch that runs a stored procedure/function. This procedure has a habit of erroring on the first of each month and gives the following: ERROR: cannot EXECUTE a null querystring CONTEXT: PL/pgSQL function "update_web_site_hits_fn" line 200 at execute statement My question is t

Re: [SQL] Problem inserting composite type values

2006-12-01 Thread Aaron Bono
On 12/1/06, Chris Dunworth <[EMAIL PROTECTED]> wrote: Aaron Bono wrote: On 12/1/06, Stephan Szabo <[EMAIL PROTECTED]> wrote: > > On Fri, 1 Dec 2006, Chris Dunworth wrote: > > > Hi all -- > > > > (huge apologies if this is a duplicate post -- I sent from an > > unsubscribed email account before

Re: [SQL] Problem inserting composite type values

2006-12-01 Thread Chris Dunworth
Aaron Bono wrote: On 12/1/06, *Stephan Szabo* <[EMAIL PROTECTED] > wrote: On Fri, 1 Dec 2006, Chris Dunworth wrote: > Hi all -- > > (huge apologies if this is a duplicate post -- I sent from an > unsubscribed email account before...) > > I

Re: [SQL] Problem inserting composite type values

2006-12-01 Thread Chris Dunworth
Stephan Szabo wrote: On Fri, 1 Dec 2006, Chris Dunworth wrote: Hi all -- (huge apologies if this is a duplicate post -- I sent from an unsubscribed email account before...) I have a problem trying to INSERT INTO a table by selecting from a function that returns a composite type. (I'm runn

Re: [SQL] Problem inserting composite type values

2006-12-01 Thread Aaron Bono
On 12/1/06, Stephan Szabo <[EMAIL PROTECTED]> wrote: On Fri, 1 Dec 2006, Chris Dunworth wrote: > Hi all -- > > (huge apologies if this is a duplicate post -- I sent from an > unsubscribed email account before...) > > I have a problem trying to INSERT INTO a table by selecting from a > function

Re: [SQL] Setting boolean column based on cumulative integer value

2006-12-01 Thread Aaron Bono
On 12/1/06, Markus Juenemann <[EMAIL PROTECTED]> wrote: Hi (again!) [stupid email program sent my message before I finished it!!!] I've got a bit of a tricky (for me!) problem. The example below is completely ficticious but describes my real problem in a way which might be easier to understand

Re: [SQL] Problem inserting composite type values

2006-12-01 Thread Stephan Szabo
On Fri, 1 Dec 2006, Chris Dunworth wrote: > Hi all -- > > (huge apologies if this is a duplicate post -- I sent from an > unsubscribed email account before...) > > I have a problem trying to INSERT INTO a table by selecting from a > function that returns a composite type. (I'm running version 8.1.

[SQL] Problem inserting composite type values

2006-12-01 Thread Chris Dunworth
Hi all -- (huge apologies if this is a duplicate post -- I sent from an unsubscribed email account before...) I have a problem trying to INSERT INTO a table by selecting from a function that returns a composite type. (I'm running version 8.1.4, FYI) Basically, I have two tables. I want to r

Re: [SQL] calling elog possibly causing problem in DirectFunctionCall1

2006-12-01 Thread Rajesh Kumar Mallah
On 12/1/06, Tom Lane <[EMAIL PROTECTED]> wrote: "Rajesh Kumar Mallah" <[EMAIL PROTECTED]> writes: > data->time_stamp = > DirectFunctionCall1(timestamptz_in, CStringGetDatum("now")); This code is incorrect, as timestamptz_in takes three arguments. replaced it with: data->time_stamp = D

Re: [SQL] calling elog possibly causing problem in DirectFunctionCall1

2006-12-01 Thread Rajesh Kumar Mallah
On 12/1/06, Tom Lane <[EMAIL PROTECTED]> wrote: "Rajesh Kumar Mallah" <[EMAIL PROTECTED]> writes: > data->time_stamp = > DirectFunctionCall1(timestamptz_in, CStringGetDatum("now")); This code is incorrect, as timestamptz_in takes three arguments. Dear Sir, thanks for the kind reply.

Re: [SQL] calling elog possibly causing problem in DirectFunctionCall1

2006-12-01 Thread Tom Lane
"Rajesh Kumar Mallah" <[EMAIL PROTECTED]> writes: > data->time_stamp = > DirectFunctionCall1(timestamptz_in, CStringGetDatum("now")); This code is incorrect, as timestamptz_in takes three arguments. regards, tom lane ---(end of broadcast)

Re: [SQL] Autovaccum

2006-12-01 Thread Shane Ambler
Ezequias Rodrigues da Rocha wrote: Could you tell me if only this both options are ok (attach) ? If I don't mark the interval of vacuuns what will be the interval of each vacuum ? The default settings may be fine for you, it depends a bit on how many insert/updates you get in a given time fra

[SQL] calling elog possibly causing problem in DirectFunctionCall1

2006-12-01 Thread Rajesh Kumar Mallah
Hi , In certain C trigger function following code snippet causes ERROR: --- elog (NOTICE , "before calling DirectFunctionCall1"); data->time_stamp = DirectFunctionCall1(timestamptz_in, CStringGetDatum("now")); elog (NOTICE , "after calling Direct

Re: [SQL] Grants

2006-12-01 Thread Adrian Klaver
On Friday 01 December 2006 06:03 am, Ezequias Rodrigues da Rocha wrote: > > 2006/11/30, imad <[EMAIL PROTECTED]>: > > You did not grant access privileges to schema. > > Also GRANT administrators on the base schema as you did for the table. > > > > --Imad > > www.EnterpriseDB.com > > > > On 12/1/06,

Re: [SQL] Setting boolean column based on cumulative integer value

2006-12-01 Thread Richard Broersma Jr
> CREATE TABLE passenger_queue ( > id serial NOT NULL, > name character varying(40) NOT NULL, > weight integer NOT NULL, > gets_seat boolean default false > ) > > insert into passenger_queue values (1,"Peter",75,false) > insert into passenger_queue values (2,"Mary",50,false) > insert into passenge

Re: [SQL] Setting boolean column based on cumulative integer value

2006-12-01 Thread A. Kretschmer
am Sat, dem 02.12.2006, um 0:50:37 +1100 mailte Markus Juenemann folgendes: > I've got a bit of a tricky (for me!) problem. The example below is > completely ficticious but > describes my real problem in a way which might be easier to understand. > > Imagine the table contains a list of passenge

Re: [SQL] Grants

2006-12-01 Thread Ezequias Rodrigues da Rocha
Schema grants CREATE SCHEMA base AUTHORIZATION root; GRANT ALL ON SCHEMA base TO root; GRANT USAGE ON SCHEMA base TO administrators; Table grants GRANT ALL ON TABLE base."local" TO root; GRANT SELECT, UPDATE, INSERT ON TABLE base."local" TO administrators; Still the same proble

[SQL] Setting boolean column based on cumulative integer value

2006-12-01 Thread Markus Juenemann
Hi (again!) [stupid email program sent my message before I finished it!!!] I've got a bit of a tricky (for me!) problem. The example below is completely ficticious but describes my real problem in a way which might be easier to understand. Imagine the table contains a list of passenger wanting

[SQL] Set binary column dependent on cumulative value of integer column

2006-12-01 Thread Markus Juenemann
Hi I've got a bit of a tricky (or me!) problem. The example below is completely ficticious but describes my real problem in a way which might be easier to understand. Imagine your table contains CREATE TABLE passenger_queue ( id serial NOT NULL, name character varying(40) NOT NULL,