[SQL] unsubscribe

2003-10-27 Thread Antony Gubert
_ Making your life easy! That is Citibank Suvidha. http://server1.msn.co.in/msnleads/citi_cards_sept03/CitiSuvidha.asp Get your account now! ---(end of broadcast)--- TIP 7: don't for

Re: [SQL] extend INSERT by 'INSERT INTO table FETCH ... FROM cursor' syntax

2003-10-27 Thread Christoph Haller
> > Please CC me, I am not subscribed. > > An imaginary SQL statement > INSERT INTO table FETCH ... FROM cursor; > looks almost the same as currently available > INSERT INTO table SELECT ...; > > I tried it because I needed to insert a row in a table > after I DELETEd a set of rows, something li

Re: [SQL] Query planner: current_* vs. explicit date

2003-10-27 Thread Tom Lane
Chris Gamache <[EMAIL PROTECTED]> writes: > By giving it a definitive range I was able to coax query planner to use the > index: > SELECT id FROM trans_table WHERE trans_date >= (SELECT > current_date::timestamptz) AND trans_date < (SELECT current_timestamp); > BTW, This didn't work: > SELECT i

[SQL] URGENT!!! changing Column size

2003-10-27 Thread mohan
Hi can we change the size of a column in postgres. I have a table named institution and column name is name varchar2(25), i want to change it to varchar2(50). Please let me know. --Mohan ---(end of broadcast)--- TIP 2: you can get off all lists

Re: [SQL] URGENT!!! changing Column size

2003-10-27 Thread Tomasz Myrta
Dnia 2003-10-27 18:10, Użytkownik [EMAIL PROTECTED] napisał: Hi can we change the size of a column in postgres. I have a table named institution and column name is name varchar2(25), i want to change it to varchar2(50). Please let me know. alter table institution add column tmp varchar2(50); update

Re: [SQL] URGENT!!! changing Column size

2003-10-27 Thread Gary Stainburn
On Monday 27 Oct 2003 5:10 pm, [EMAIL PROTECTED] wrote: > Hi can we change the size of a column in postgres. I have a table named > institution and column name is name varchar2(25), i want to change it to > varchar2(50). Please let me know. > > --Mohan try alter table institution add column newn

Re: [SQL] extend INSERT by 'INSERT INTO table FETCH ... FROM cursor' syntax

2003-10-27 Thread Josh Berkus
Alexander, > > BEGIN; > > DECLARE total CURSOR > > FOR SELECT=20 > > SUBSTR(datetime,1,7)||'-01 00:00:00' as month, > > client, > > SUM(money) > > FROM stat > > WHERE SUBSTR(datetime,1,7)=3D'2003-10' > > GROUP BY month,client; > > DELETE FROM stat WHERE SUBSTR(datetime,1,7)=3D'2003-10';

Re: [SQL] URGENT!!! changing Column size

2003-10-27 Thread Tomasz Myrta
Dnia 2003-10-27 19:33, Użytkownik [EMAIL PROTECTED] napisał: I've seen these sets of steps suggested in response to other such inquires, but doesn't this break views on the associated table, or may just not work because if a view dependency exists? It would be the second case (it won't work at all)

[SQL] Error with DROP column

2003-10-27 Thread mohan
Hi All i am trying to DROP the column but i keep getting this error. ALTER TABLE institution DROP COLUMN name CASCADE; ERROR: ALTER TABLE / DROP COLUMN is not implemented please help me in solving this issue. ---(end of broadcast)--- TIP 8:

Re: [SQL] Error with DROP column

2003-10-27 Thread Devrim GUNDUZ
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, On Mon, 27 Oct 2003 [EMAIL PROTECTED] wrote: > Hi All i am trying to DROP the column but i keep getting this error. > > ALTER TABLE institution DROP COLUMN name CASCADE; > ERROR: ALTER TABLE / DROP COLUMN is not implemented I think you are u

Re: [SQL] Error with DROP column

2003-10-27 Thread Tomasz Myrta
Dnia 2003-10-27 20:35, Użytkownik [EMAIL PROTECTED] napisał: Hi All i am trying to DROP the column but i keep getting this error. ALTER TABLE institution DROP COLUMN name CASCADE; ERROR: ALTER TABLE / DROP COLUMN is not implemented please help me in solving this issue. Looks like Postgresql olde

Re: [SQL] extend INSERT by 'INSERT INTO table FETCH ... FROM cursor' syntax

2003-10-27 Thread Alexander Vlasenko
On Monday 27 October 2003 21:35, Josh Berkus wrote: > Alexander, > > > > BEGIN; > > > DECLARE total CURSOR > > > FOR SELECT=20 > > > SUBSTR(datetime,1,7)||'-01 00:00:00' as month, > > > client, > > > SUM(money) > > > FROM stat > > > WHERE SUBSTR(datetime,1,7)=3D'2003-10' > > > GROUP BY mo

Re: [SQL] URGENT!!! changing Column size

2003-10-27 Thread CoL
Hi, [EMAIL PROTECTED] wrote, On 10/27/2003 6:10 PM: Hi can we change the size of a column in postgres. I have a table named institution and column name is name varchar2(25), i want to change it to varchar2(50). Please let me know. 1 solution: begin; create temporary table temp as select * from m

[SQL] connectby

2003-10-27 Thread sector119
hi I have menu table: id | integer | not null default nextval('public.menu_id_seq'::text) parent_id | integer | description | text| I do select: test=> SELECT * FROM connectby('menu','id','parent_id','2',0,'~') t(id integer, parent_id integer, level int, branch text); id |

[SQL] connectby

2003-10-27 Thread Sergei Levchenko
hi I have menu table: id | integer | not null default nextval('public.menu_id_seq'::text) parent_id | integer | description | text| I do select: test=> SELECT * FROM connectby('menu','id','parent_id','2',0,'~') t(id integer, parent_id integer, level int, branch text); id | pa

Re: [SQL] connectby

2003-10-27 Thread George Essig
> hi > > I have menu table: > id | integer | not null default > nextval('public.menu_id_seq'::text) > parent_id | integer | > description | text| > > I do select: > test=> SELECT * FROM connectby('menu','id','parent_id','2',0,'~') t(id > integer, parent_id integer, level in