Re: [GENERAL] Rename extension?

2013-09-16 Thread Albe Laurenz
Moshe Jacobson wrote: > Is there a way to rename an installed extension? > > I have written an extension, but I don't like the name I originally chose, > and I would therefore like > to rename it. However, it is installed on a production system, from which it > cannot be uninstalled, > and I wou

[GENERAL] Rename extension?

2013-09-14 Thread Moshe Jacobson
Is there a way to rename an installed extension? I have written an extension, but I don't like the name I originally chose, and I would therefore like to rename it. However, it is installed on a production system, from which it cannot be uninstalled, and I would like to rename it there, too. How

[GENERAL] Rename

2011-07-19 Thread salah jubeh
Hello, I would like to know the effect of alter table rename, I know that the some things are changed automatcally such as views dependencies and forign keys and some things remain the same such as function defenesions. Is there is a place where can I find the exact effect of rename Regards

Re: [GENERAL] Rename a constraint

2011-05-29 Thread Thom Brown
On 29 May 2011 16:12, Tom Lane wrote: > Thom Brown writes: >> On 10 January 2009 19:22, Raymond O'Donnell wrote: >>> On 10/01/2009 19:15, Thom Brown wrote: I can't find anything in the documentation, but does anyone know if there is a way to rename a constraint? > >>> I just tried it w

Re: [GENERAL] Rename a constraint

2011-05-29 Thread Tom Lane
Thom Brown writes: > On 10 January 2009 19:22, Raymond O'Donnell wrote: >> On 10/01/2009 19:15, Thom Brown wrote: >>> I can't find anything in the documentation, but does anyone know if >>> there is a way to rename a constraint? >> I just tried it with a primary key... >> >> test=# alter table

Re: [GENERAL] Rename a constraint

2011-05-29 Thread Thom Brown
On 10 January 2009 19:22, Raymond O'Donnell wrote: > On 10/01/2009 19:15, Thom Brown wrote: >> I can't find anything in the documentation, but does anyone know if >> there is a way to rename a constraint? > > I just tried it with a primary key... > > test=# alter table t1 alter constraint t1_pk re

Re: [GENERAL] Rename or Re-Create Constraints?

2011-04-09 Thread Adrian Klaver
On Saturday, April 09, 2011 2:59:06 pm Carlos Mennens wrote: > > > Is there a difference between an INDEX and a CONSTRAINT? Oops forgot to add this to my previous reply. The short version, an INDEX is one form of a CONSTRAINT. For the long version look at the CREATE TABLE section of the docs. I

Re: [GENERAL] Rename or Re-Create Constraints?

2011-04-09 Thread Adrian Klaver
On Saturday, April 09, 2011 2:59:06 pm Carlos Mennens wrote: > On Sat, Apr 9, 2011 at 12:58 PM, Tom Lane wrote: > > ALTER INDEX accounts_pkey RENAME TO whatever > > > > On very old versions of PG you may have to spell that "ALTER TABLE" > > instead of "ALTER INDEX", but it's the same thing either

Re: [GENERAL] Rename or Re-Create Constraints?

2011-04-09 Thread Carlos Mennens
On Sat, Apr 9, 2011 at 12:58 PM, Tom Lane wrote: > ALTER INDEX accounts_pkey RENAME TO whatever > > On very old versions of PG you may have to spell that "ALTER TABLE" > instead of "ALTER INDEX", but it's the same thing either way. Thank you so much for clearing that up for me Tom! I just couldn'

Re: [GENERAL] Rename or Re-Create Constraints?

2011-04-09 Thread Tom Lane
Carlos Mennens writes: > On Fri, Apr 8, 2011 at 8:35 PM, Tom Lane wrote: >> I believe you can rename the underlying indexes and the constraints will >> follow them.  (This works in HEAD anyway, not sure how far back.) > I renamed the table name from 'accounts' to 'marketing' however all > the co

Re: [GENERAL] Rename or Re-Create Constraints?

2011-04-09 Thread Carlos Mennens
On Fri, Apr 8, 2011 at 8:35 PM, Tom Lane wrote: > I believe you can rename the underlying indexes and the constraints will > follow them.  (This works in HEAD anyway, not sure how far back.) Below is my table: inkpress=# \d marketing Table "public.marketing" Column | Type

Re: [GENERAL] Rename or Re-Create Constraints?

2011-04-08 Thread Rob Sargent
Carlos Mennens wrote: On Fri, Apr 8, 2011 at 8:35 PM, Tom Lane wrote: I believe you can rename the underlying indexes and the constraints will follow them. (This works in HEAD anyway, not sure how far back.) I'm sorry but I don't understand what that means or how to relate that to

Re: [GENERAL] Rename or Re-Create Constraints?

2011-04-08 Thread Carlos Mennens
On Fri, Apr 8, 2011 at 8:35 PM, Tom Lane wrote: > I believe you can rename the underlying indexes and the constraints will > follow them.  (This works in HEAD anyway, not sure how far back.) I'm sorry but I don't understand what that means or how to relate that to a SQL command to rename the cons

Re: [GENERAL] Rename or Re-Create Constraints?

2011-04-08 Thread Tom Lane
Carlos Mennens writes: > 1. Do I need to remove all the table constraints or is there a way to > rename them? I believe you can rename the underlying indexes and the constraints will follow them. (This works in HEAD anyway, not sure how far back.) > 2. When renaming the table, is there a way to

[GENERAL] Rename or Re-Create Constraints?

2011-04-08 Thread Carlos Mennens
I've searched and really can't find a definitive example or someone renaming a constraint. I renamed a table yesterday and noticed that the constraint name was still named the old table name: inkpress=# ALTER TABLE accounts RENAME TO fashion; ALTER TABLE inkpress=# \d fashion Table "pu

[GENERAL] Rename Schema Removes Unique Constraints?

2010-12-31 Thread Carlos Mennens
I decided last night to rename my 'public' schema (Not sure of that's a good / bad idea) since I'm still learning about how schema's work on PostgreSQL. My question is: 1. If I have a constraint (specifically 'unique') on a specific table, when I rename the public schema, does that impact my ''uni

Re: [GENERAL] rename table and triggers

2010-06-18 Thread Vick Khera
On Fri, Jun 18, 2010 at 1:41 PM, Michele Petrazzo - Unipex wrote: > now I just uncovered  a strange behavior from my point of view: I have a > table with a trigger associated with its insert. If I rename that table, the > trigger "follow" its parent. The trigger is connected to the table, not the

[GENERAL] rename table and triggers

2010-06-18 Thread Michele Petrazzo - Unipex
Hi list, now I just uncovered a strange behavior from my point of view: I have a table with a trigger associated with its insert. If I rename that table, the trigger "follow" its parent. Are this a wanted and the normal behavior? Are there somewhere a documentation about? Thanks, Michele --

Re: [GENERAL] Rename a constraint

2009-01-10 Thread Thom Brown
That would make more sense wouldn't it. :) Yeah, I think that's the answer. Cheers! Thom 2009/1/10 Raymond O'Donnell > On 10/01/2009 19:15, Thom Brown wrote: > > I can't find anything in the documentation, but does anyone know if > > there is a way to rename a constraint? > > I just tried it

Re: [GENERAL] Rename a constraint

2009-01-10 Thread Raymond O'Donnell
On 10/01/2009 19:15, Thom Brown wrote: > I can't find anything in the documentation, but does anyone know if > there is a way to rename a constraint? I just tried it with a primary key... test=# alter table t1 alter constraint t1_pk rename to t1_pp; ERROR: syntax error at or near "constraint" LI

[GENERAL] Rename a constraint

2009-01-10 Thread Thom Brown
I can't find anything in the documentation, but does anyone know if there is a way to rename a constraint? Thanks Thom

Re: [GENERAL] rename constraints ?

2007-04-17 Thread Bruce Momjian
Jonathan Vanasco wrote: > I didn't see anything in the docs. > I saw something in the FAQ suggesting this was in a TODO. > > Any idea when? TODO has: o %Allow ALTER TABLE ... ALTER CONSTRAINT ... RENAME http://archives.postgresql.org/pgsql-patches/2006-02/msg00168.php -- B

[GENERAL] rename constraints ?

2007-04-17 Thread Jonathan Vanasco
I didn't see anything in the docs. I saw something in the FAQ suggesting this was in a TODO. Any idea when? ---(end of broadcast)--- TIP 3: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faq

[GENERAL] Rename database?

2001-06-12 Thread Flacco
How can I rename a database in PostgreSQL? ---(end of broadcast)--- TIP 6: Have you searched our list archives? http://www.postgresql.org/search.mpl

[GENERAL] Rename a database

1999-02-18 Thread Bryan White
Is there a way rename a database? I currently have a 'live' and a 'test' database. For reasons I won't delve into all the programs are currently using 'test'. I want a quick way of getting all the data into 'live'. I am guessing I can shutdown the postmaster and then move and/or copy directori