Re: [SQL] i have table

2006-10-10 Thread Andrew Sullivan
On Mon, Oct 09, 2006 at 11:01:17AM -0500, Aaron Bono wrote: > On 10/5/06, Andrew Sullivan <[EMAIL PROTECTED]> wrote: > >you want to insert &c., you put some rules there. > > If you do this you need to make the view updateable or > inserts/updat

Re: [SQL] i have table

2006-10-09 Thread Aaron Bono
On 10/5/06, Andrew Sullivan <[EMAIL PROTECTED]> wrote: On Wed, Oct 04, 2006 at 11:20:07AM -0500, Aaron Bono wrote:>> So do it as needed and convert your application slowly.You don't even need to do that.ALTER TABLE tablename RENAME TO tablename_real; CREATE VIEW tablename [&c.]Now the view looks to

Re: [SQL] i have table

2006-10-05 Thread Andrew Sullivan
On Wed, Oct 04, 2006 at 11:20:07AM -0500, Aaron Bono wrote: > > So do it as needed and convert your application slowly. You don't even need to do that. ALTER TABLE tablename RENAME TO tablename_real; CREATE VIEW tablename [&c.] Now the view looks to the application just like the old table.

Re: [SQL] i have table

2006-10-05 Thread Achilleas Mantzios
Στις Πέμπτη 05 Οκτώβριος 2006 16:31, ο/η Tom Lane έγραψε: > Achilleas Mantzios <[EMAIL PROTECTED]> writes: > > Alright, you could play with something like: > > > > UPDATE pg_attribute SET attnum = where > > attrelid= and attname=''; > > That's guaranteed to break his table, because the physical st

Re: [SQL] i have table

2006-10-05 Thread Tom Lane
Achilleas Mantzios <[EMAIL PROTECTED]> writes: > Alright, you could play with something like: > UPDATE pg_attribute SET attnum = where > attrelid= and attname=''; That's guaranteed to break his table, because the physical storage of the rows won't have changed. (To name only the most obvious p

Re: [SQL] i have table

2006-10-05 Thread Achilleas Mantzios
Στις Τετάρτη 04 Οκτώβριος 2006 18:37, ο/η Erik Jones έγραψε: > Aaron Bono wrote: > > On 10/4/06, *Erik Jones* <[EMAIL PROTECTED] > > > wrote: > > > > There is one non-SQL related reason that I like to be able to order > > columns, at least the way they are displaye

Re: [SQL] i have table

2006-10-04 Thread operationsengineer1
--- "Penchalaiah P." <[EMAIL PROTECTED]> wrote: > > Hi ... > > I have one table with 12 fields.. > > > > CREATE TABLE addition_alteration_memo > > ( > > addition_alteration_memo int8 NOT NULL DEFAULT > nextval('addition_alteration_memo_addition_alteration_memo_seq'::regclas > s), > > c

Re: [SQL] i have table

2006-10-04 Thread Scott Marlowe
On Wed, 2006-10-04 at 13:02, Aaron Bono wrote: > On 10/4/06, Daryl Richter <[EMAIL PROTECTED]> wrote: > On 10/4/06 12:20 PM, "Aaron Bono" <[EMAIL PROTECTED]> > wrote: > > > > So do it as needed and convert your application slowly. > > > > I just name

Re: [SQL] i have table

2006-10-04 Thread Aaron Bono
On 10/4/06, Daryl Richter <[EMAIL PROTECTED]> wrote: On 10/4/06 12:20 PM, "Aaron Bono" <[EMAIL PROTECTED]> wrote:> On 10/4/06, Erik Jones <[EMAIL PROTECTED]> wrote: Aaron Bono wrote:>>> On 10/4/06, *Erik Jones* <[EMAIL PROTECTED] [EMAIL PROTECTED]> wrote: >> There is one non-SQL re

Re: [SQL] i have table

2006-10-04 Thread Daryl Richter
On 10/4/06 12:20 PM, "Aaron Bono" <[EMAIL PROTECTED]> wrote: > On 10/4/06, Erik Jones <[EMAIL PROTECTED]> wrote: >> >> Aaron Bono wrote: >>> On 10/4/06, *Erik Jones* <[EMAIL PROTECTED] > >>> wrote: >>> >>> There is one non-SQL related reason that I like to be able t

Re: [SQL] i have table

2006-10-04 Thread Aaron Bono
On 10/4/06, Erik Jones <[EMAIL PROTECTED]> wrote: Aaron Bono wrote:> On 10/4/06, *Erik Jones* <[EMAIL PROTECTED] [EMAIL PROTECTED]>>> wrote:>> There is one non-SQL related reason that I like to be able to order > columns, at least the way they are displayed whenever the table is> descri

Re: [SQL] i have table

2006-10-04 Thread Erik Jones
Aaron Bono wrote: On 10/4/06, *Erik Jones* <[EMAIL PROTECTED] > wrote: There is one non-SQL related reason that I like to be able to order columns, at least the way they are displayed whenever the table is described: human comprehension. For example, I li

Re: [SQL] i have table

2006-10-04 Thread Aaron Bono
On 10/4/06, Erik Jones <[EMAIL PROTECTED]> wrote: There is one non-SQL related reason that I like to be able to ordercolumns, at least the way they are displayed whenever the table isdescribed:  human comprehension.  For example, I like to group all keysin a table before data, that includes primary

Re: [SQL] i have table

2006-10-04 Thread Erik Jones
There is one non-SQL related reason that I like to be able to order columns, at least the way they are displayed whenever the table is described: human comprehension. For example, I like to group all keys in a table before data, that includes primary as well as foreign keys. So, say I'm bui

Re: [SQL] i have table

2006-10-04 Thread Markus Schaber
Hi, Penchalaiah, Penchalaiah P. wrote: > now I want to add one more field in this table.. but that field has to > come next to cda_no.. I mean as a 3^rd field.. If I am adding that field > it is coming last field … In SQL, field order in the table is not given by design. A "SELECT * FROM table"

Re: [SQL] i have table

2006-10-03 Thread Daryl Richter
On 10/3/06 6:47 AM, "Penchalaiah P." <[EMAIL PROTECTED]> wrote: > > Hi ... > > I have one table with 12 fields.. > > > now I want to add one more field in this table.. but that field has to > come next to cda_no.. I mean as a 3rd field.. If I am adding that field > it is coming last field ...

Re: [SQL] i have table

2006-10-03 Thread Achilleas Mantzios
Στις Τρίτη 03 Οκτώβριος 2006 13:47, ο/η Penchalaiah P. έγραψε: > Hi ... > > I have one table with 12 fields.. > > > > CREATE TABLE addition_alteration_memo > > ( > > addition_alteration_memo int8 NOT NULL DEFAULT > nextval('addition_alteration_memo_addition_alteration_memo_seq'::regclas > s), > >

Re: [SQL] i have table

2006-10-03 Thread A. Kretschmer
am Tue, dem 03.10.2006, um 16:17:30 +0530 mailte Penchalaiah P. folgendes: > now I want to add one more field in this table.. but that field has to come > next to cda_no.. I mean as a 3^rd field.. If I am adding that field it is > coming last field ? Yes. > > may I know how it is possible to th

[SQL] i have table

2006-10-03 Thread Penchalaiah P.
Hi … I have one table with 12 fields..   CREATE TABLE addition_alteration_memo (   addition_alteration_memo int8 NOT NULL DEFAULT nextval('addition_alteration_memo_addition_alteration_memo_seq'::regclass),   cda_no varchar(7) NOT NULL,   week numeric,   sheet_no numeric,   serial_