At 02:20 AM 3/25/2009, pgsql-sql-ow...@postgresql.org wrote:
To: Zdravko Balorda
cc: pgsql-sql@postgresql.org
Subject: Re: Alter Table/Indexing
In-reply-to: <49c89fea.8060...@siix.com>
References: <49c89fea.8060...@siix.com>
Comments: In-reply-to Zdravko Balorda
message dated "Tue, 24 M
Zdravko Balorda writes:
> I wonder does ATER TABLE TYPE, SET, depends on indexes, like INSERT does
> in a sense it may be faster to drop and recreate index than sorting
> after every row inserted.
ALTER TABLE TYPE already rebuilds the indexes; you won't make the
overall process any faster by doi
On 2009-03-19, Zdravko Balorda wrote:
>
> Hi,
>
> I need to make some ALTER TABLEs. It takes about 30min to copy
> this quite large databse, bat several ours to run a bunch of ALTER
> TABLE statements.
which do you prefer 30 minutes down-time to reload the database or a
few hours wait to update i
Hi,
I wonder does ATER TABLE TYPE, SET, depends on indexes, like INSERT does
in a sense it may be faster to drop and recreate index than sorting
after every row inserted. Does changing type or setting default on an
indexed column require sorting?
Thanks, Zdravko
--
Sent via pgsql-sql mail
On Thu, Mar 19, 2009 at 1:57 AM, Zdravko Balorda
wrote:
>
> Hi,
>
> I need to make some ALTER TABLEs. It takes about 30min to copy
> this quite large databse, bat several ours to run a bunch of ALTER
> TABLE statements.
> Is there any way to make it faster? I wonder what could possibly alter table
Στις Thursday 19 March 2009 09:57:11 ο/η Zdravko Balorda έγραψε:
>
> Hi,
>
> I need to make some ALTER TABLEs. It takes about 30min to copy
> this quite large databse, bat several ours to run a bunch of ALTER
> TABLE statements.
> Is there any way to make it faster? I wonder what could possibly a
Hi,
I need to make some ALTER TABLEs. It takes about 30min to copy
this quite large databse, bat several ours to run a bunch of ALTER
TABLE statements.
Is there any way to make it faster? I wonder what could possibly alter
table be doing all this time.
Regards, Zdravko.
--
Sent via pgsql-sq
On Jan 23, 2008 4:25 AM, Andreas Joseph Krogh <[EMAIL PROTECTED]> wrote:
> Does PG have any way of doing $subject without writing a plpgsql-function
> which does it by querying the catalog manually?
No.
---(end of broadcast)---
TIP 6: explain analyz
Does PG have any way of doing $subject without writing a plpgsql-function
which does it by querying the catalog manually?
I'm looking for an equivalent of "DROP TABLE IF EXISTS "
--
Andreas Joseph Krogh <[EMAIL PROTECTED]>
Senior Software Developer / Manager
+---
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
On Thu, 2007-03-15 at 08:35, Shavonne Marietta Wijesinghe wrote:
> When i alter a table and add a new column it always adds it to the end
> of the table. Is there any way to tell it to add the new column at the
> 5th position or to add the new column after a surtain column.
No, but the good news i
am Thu, dem 15.03.2007, um 14:35:41 +0100 mailte Shavonne Marietta Wijesinghe
folgendes:
> When i alter a table and add a new column it always adds it to the end of the
> table. Is there any way to tell it to add the new column at the 5th position
> or
> to add the new column after a surtain col
When i alter a table and add a new column it always adds it to the end of the
table. Is there any way to tell it to add the new column at the 5th position or
to add the new column after a surtain column.
Thanks
Shavonne Wijesinghe
http://www.studioform.it
On Feb 16, 2006, at 3:11 , Maciej Piekielniak wrote:
How can i modify few fields with alter?
I think you need to alter columns one at a time. If you need them to
go into effect at the same time, you can wrap the multiple ALTER
TABLE statements in a transaction. For example,
begin;
ALTER
Hello Stephan,
Wednesday, February 15, 2006, 9:03:26 PM, you wrote:
SS> Not in 7.4, but I believe 8.1 allows that (ALTER TABLE ALTER COLUMN TYPE
SS> with semi-optional USING)
Thx for all.
--
Best regards,
Maciejmailto:[EMAIL PROTECTED]
---
On Wed, 15 Feb 2006, Owen Jacobson wrote:
> Maciej Piekielniak wrote:
> >
> > Wednesday, February 15, 2006, 8:31:17 PM, you wrote:
> > OJ> Note that prior to 8.0 PostgreSQL does not support
> > multiple ALTER actions in a single query. To get an
> > equivalent effect, wrap separate ALTER TABLE qu
Maciej Piekielniak wrote:
>
> Hello Owen,
>
> Wednesday, February 15, 2006, 8:56:05 PM, you wrote:
> >> ALTER TABLE proc MODIFY name varchar(64) DEFAULT '' NOT NULL;
>
> OJ> Not under 7.4.
>
> Hmm, maybe postgres can copy constraints and properties in
> "create table .. as select"?
What is it
Hello Owen,
Wednesday, February 15, 2006, 8:56:05 PM, you wrote:
>> ALTER TABLE proc MODIFY name varchar(64) DEFAULT '' NOT NULL;
OJ> Not under 7.4.
Hmm, maybe postgres can copy constraints and properties in "create table .. as
select"?
CREATE TABLE fv_wystawione
( abonament) AS SELECT a.nazwa
Maciej Piekielniak wrote:
>
> Wednesday, February 15, 2006, 8:31:17 PM, you wrote:
> OJ> Note that prior to 8.0 PostgreSQL does not support
> multiple ALTER actions in a single query. To get an
> equivalent effect, wrap separate ALTER TABLE queries in a transaction:
>
> OJ> BEGIN;
> OJ> alter
Hello Owen,
Wednesday, February 15, 2006, 8:31:17 PM, you wrote:
OJ> Note that prior to 8.0 PostgreSQL does not support multiple ALTER actions
in a single query. To get an equivalent effect, wrap separate ALTER TABLE
queries in a transaction:
OJ> BEGIN;
OJ> alter table xyz alter column id set
, alter column foo set default '';
> >
> > PGAdmin-SQL:
> >
> > alter table xyz alter column id set default
> nextval('xyz_seq'), alter column foo set default '';
> >
> > ERROR: syntax error at or n
Hello Andreas,
Wednesday, February 15, 2006, 8:27:00 PM, you wrote:
AK> test=# select version();
AK>version
AK>
--
AK> PostgreSQL 8.1.2
Maciej Piekielniak <[EMAIL PROTECTED]> schrieb:
> Hello Andreas,
>
> Wednesday, February 15, 2006, 7:54:28 PM, you wrote:
> AK> test=# alter table xyz alter column id set default nextval('xyz_seq'),
> alter column foo set default '';
>
> PGA
Hello Andreas,
Wednesday, February 15, 2006, 7:54:28 PM, you wrote:
AK> test=# alter table xyz alter column id set default nextval('xyz_seq'),
alter column foo set default '';
PGAdmin-SQL:
alter table xyz alter column id set default nextval('xyz_seq'), alter c
Maciej Piekielniak <[EMAIL PROTECTED]> schrieb:
> Hello ,
>
> How can i modify few fields with alter?
>
> ALTER TABLE fv_wystawione
> ALTER id_fv SET DEFAULT nextval('id_fv_seq'::text),
> ALTER imie SET DEFAULT '';
test=# create table xyz (id int not null);
CREATE TABLE
test=# create sequ
Hello ,
How can i modify few fields with alter?
ALTER TABLE fv_wystawione
ALTER id_fv SET DEFAULT nextval('id_fv_seq'::text),
ALTER imie SET DEFAULT '';
Syntax error in last line.
--
Best regards,
Maciej mailto:[EMAIL PROTECTED]
---(en
On Wed, 10 Mar 2004, David wrote:
> Ok another very newbie question. How can i change the data type a column can
> accept? at the moment it will only take character(7) i want to change it to
> varchar(30), but i cant figure how, ideas?
While there are ways to tinker with the system catalogs to ch
Ok another very newbie question. How can i change the data type a column can
accept? at the moment it will only take character(7) i want to change it to
varchar(30), but i cant figure how, ideas?
Many thanks Dave
---(end of broadcast)---
TIP 8: exp
if the constraint are named $1 $2 etc you will need to quote them eg
ALTER TABLE xyz DROP CONSTRAINT "$1" ;
in some version you may require
ALTER TABLE xyz DROP CONSTRAINT "$1" RESTRICT;
What is ur version btw?
try to post the table structure also.
regds mallah.
Elielson Fontanezi wrote:
H
It works in 7.3.2.
George
- Original Message -
From:
Elielson Fontanezi
To: pgsql-general ; pgsql-sql
Sent: Wednesday, July 30, 2003 10:52
AM
Subject: [SQL] ALTER TABLE ... DROP
CONSTRAINT
Hi
all!
Who can tell me what postgres version supports
I think you can do some constraints in 7.2, but 7.3 will allow dropping
them all in that fashion.
On Wed, 2003-07-30 at 11:52, Elielson Fontanezi wrote:
> Hi all!
>
> Who can tell me what postgres version supports ALTER TABLE... DROP
> CONSTRAINT without
> the need of droping the table to re
Hi
all!
Who can tell me what postgres version supports
ALTER TABLE... DROP CONSTRAINT without
the need
of droping the table to remove a simple coinstraint.
(link)
>\\\!/< 55
11 5080
9283
Hi
all!
Who can tell me what postgres version supports ALTER TABLE... DROP
CONSTRAINT without
the need of
droping the table to remove a simple coinstraint. (link)
>\\\!/< 55
11 5080
9283
!_"""_! Elielson
Pardon stupidiy, what is the right syntax for dropping a foreign key?
Struggling here!
TIA
---
Thomas Good e-mail: [EMAIL PROTECTED]
Programmer/Analyst phone: (+1) 718.
I think 7.3 has this feature.
Daniel
""Rachel.Vaudron"" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
news:Pine.LNX.4.33.0211080811160.12232-10@;lazaret.unice.fr...
> Hi,
>
> I wonder if it is possible to remove a field of a table ?
> I haven't found anything about this into the reference manual
Thanks a lot, but it's already what i am doing!
It's very a pity that there is no way do to this more quickly!!!
> alter table xxx rename to temp;
> create table xxx as
> select field1, field2, ...without some field... from temp;
> drop table temp;
>
> Tomasz Myrta
>
>
Rachel
-
Uz.ytkownik Rachel.Vaudron napisa?:
Hi,
I wonder if it is possible to remove a field of a table ?
I haven't found anything about this into the reference manual.
Can I do something like that ?:
ALTER TABLE table
DROP COLUMN column;
alter table xxx rename to temp;
create table xxx as
select fiel
Hi,
I wonder if it is possible to remove a field of a table ?
I haven't found anything about this into the reference manual.
Can I do something like that ?:
ALTER TABLE table
DROP COLUMN column;
Thanks
Rachel
**
[EMAIL PROTECTED]
Laboratoire de prehistoire
On Fri, 27 Apr 2001, Scott David Walter wrote:
> I am attempting to add a few attributes to an existing table that already
> contains data. The problem that I am having is that the new attributes
> that I want to add need to be forgein key references to other tables. I
> can't figure out how to
I am attempting to add a few attributes to an existing table that already
contains data. The problem that I am having is that the new attributes
that I want to add need to be forgein key references to other tables. I
can't figure out how to create the attribute with a reference to another
table.
How do I alter a table to set a column to be not null?
--
Joseph Shraibman
[EMAIL PROTECTED]
Increase signal to noise ratio. http://www.targabot.com
Forest Wilkinson <[EMAIL PROTECTED]> writes:
> A coworker told me that the postgres implementation of ALTER TABLE ADD
> COLUMN creates an inefficient database.
Dunno where he got that idea.
There are some problems lurking in ADD COLUMN when used on a table with
inheritance children --- the new c
A coworker told me that the postgres implementation of ALTER TABLE ADD
COLUMN creates an inefficient database. He said it results in a table
whose new column is stored someplace other than the rest of the columns.
(A hidden auxiliary table?) Is this true in postgres 6.5.3? 7.x? Was it
ever tru
I used the command below to alter a table and it took with no problem, but the
REFERENCES appears to have been ignored since I can put invalid numbers into
last_post_id. Are there plans to add the ability to specify column
constrainsts with ALTER TABLE ADD COLUMN in the future? For now, I suppo
44 matches
Mail list logo