[GENERAL] Procedure for adding a column

2003-10-11 Thread David Shadovitz
I need to add a column to a table.  This table holds several thousand
records, has several indexes, and serves as the parent table to a few
child tables.

When I've done this in the past, it has taken quite a long time for
the ALTER TABLE command to complete.

So, what is the correct procedure for adding a column?  Drop the
indexes, add the column, and recreate the indexes?

Thanks.
-David

---(end of broadcast)---
TIP 8: explain analyze is your friend


Re: [GENERAL] Where are PL/pgSQL functions stored?

2003-09-18 Thread David Shadovitz
Thanks to Alvaro H. and Joshua D. for pointing me to pg_proc.

The function I was looking for is an overloaded one, so in my query of
pg_proc I had to specify the signature of the one that I wanted.

My favorite page, for today:
http://www.postgresql.org/docs/7.3/static/catalogs.html

-David

> Where are PL/pgSQL functions stored?  I want to retrieve the text of a
> function that I've created.

---(end of broadcast)---
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])


[GENERAL] Where are PL/pgSQL functions stored?

2003-09-17 Thread David Shadovitz
Where are PL/pgSQL functions stored?  I want to retrieve the text of a
function that I've created.

Thanks.
-David

---(end of broadcast)---
TIP 8: explain analyze is your friend


[GENERAL] CHAR vs TEXT args

2003-08-28 Thread David Shadovitz
I've created two PL/pgSQL functions with the same name and different
signatures:

CREATE FUNCTION ABC(CHAR) ...
CREATE FUNCTION ABC(TEXT) 

I intended to call the CHAR-signature function like this:
SELECT ABC('R');

And the TEXT-signature function like this:
SELECT ABC('Right');

But I found that both calls invoke the TEXT-signature function.  So is
there any distinction between CHAR and TEXT?  Can I somehow specify
that the argument 'R' is to be treated as a CHAR, so the
CHAR-signature version of ABC is executed?

Thanks.
-David

---(end of broadcast)---
TIP 5: Have you checked our extensive FAQ?

   http://www.postgresql.org/docs/faqs/FAQ.html