On Sat, Jan 07, 2006 at 02:45:44PM -0500, Robert Treat wrote:
> You should be able to do this now using pg_depend, it would just take a bit
> of
> leg-work. Pretty sure it would be easier than solving physical/logical
> attribute separation. Someone writing a pg_list_all_dependencies function
You should be able to do this now using pg_depend, it would just take a bit of
leg-work. Pretty sure it would be easier than solving physical/logical
attribute separation. Someone writing a pg_list_all_dependencies function
would make for a really good head start... I wonder if the newsysviews
As I recall, the MS SQL Server draggy droppy diagrammer tool made it
seem trivial to rearrange columns did the same thing. It just
generated SQL statements to:
Begin transaction
select data in new order into a new table
drop dependent objects
drop old table
rename new table
re-create dependent ob
> I would assume
> that all dependent database objects are also dropped when you drop the
> table, so you'd have to recreate all of your foreign keys (both
> directions) and triggers etc.?
Basically. I try to keep my DDL scripts organized in a way that makes this
easy. Of course an automated tool
"Jim C. Nasby" <[EMAIL PROTECTED]> writes:
> Actually, I'm pretty sure this is on the TODO.
[ checks... ] No, it isn't. My recollection is that we looked very
hard at this around the time DROP COLUMN was implemented, and concluded
that we weren't ever going to support it, because distinguishing
Actually, I'm pretty sure this is on the TODO. It can't really happen
until we have the ability to somehow divorce on-disk ordering from
what's presented in the catalog. It's not exactly rocket science to make
this happen, but it is quite a bit of work...
On Fri, Jan 06, 2006 at 10:59:12AM -0600,
John McCawley <[EMAIL PROTECTED]> schrieb:
> OK, one last question on the subject and I'll shut up. I would assume that
> all dependent database objects are also dropped when you drop the table, so
> you'd have to recreate all of your foreign keys (both directions) and
> triggers etc.?
Um, ye
Andreas Kretschmer wrote:
John McCawley <[EMAIL PROTECTED]> schrieb:
However, in the real world, ...
...And i think, other systems do this:
- begin
- create a new temp. table with the new order
- insert all values from the old table in the new temp. table
- drop the old table
- renam
OK, one last question on the subject and I'll shut up. I would assume
that all dependent database objects are also dropped when you drop the
table, so you'd have to recreate all of your foreign keys (both
directions) and triggers etc.?
Andreas Kretschmer wrote:
John McCawley <[EMAIL PROTECT
John McCawley <[EMAIL PROTECTED]> schrieb:
> However, in the real world, columns are often added willy-nilly as they are
> needed, and it is not immediately obvious which, if any, of the columns
> will be related. Later, solely for visual clarity, it is desirable to have
> the ability to reorde
I would certainly never have any of my normal application code depend on
the ordering of columns. My desire for column ordering is strictly for
administration purposes, keeping the visual clarity of the datamodel,
and ensuring that the visual datamodel is consistent with what is
actually in th
John McCawley <[EMAIL PROTECTED]> schrieb:
> I believe that it makes a lot of practical difference, just like organizing
> related code into files, classes etc. is important for clarity. This isn't
> a trivial thing, and the other (sarcastic?) suggestion that I reorder my
> select misses the p
I believe that it makes a lot of practical difference, just like
organizing related code into files, classes etc. is important for
clarity. This isn't a trivial thing, and the other (sarcastic?)
suggestion that I reorder my select misses the point.
I think that having a good visual representa
am 06.01.2006, um 9:45:53 -0600 mailte John McCawley folgendes:
> Is there a way to change the order of columns in a table in Postgres after
> it has been created? Back when I used MS SQL Server, it was trivial to go
Yes. 'select foo, bar, batz from table', 'select bar, foo, batz from
table'
John McCawley wrote:
Is there a way to change the order of columns in a table in Postgres
after it has been created? ...
The best way to do it is when you have the opportunity to do a restore,
edit the pg_dump output between the dump and the restore steps. There
are other approaches that mi
John McCawley wrote:
Is there a way to change the order of columns in a table in Postgres
after it has been created? Back when I used MS SQL Server, it was
trivial to go into Enterprise Manager and move columns up and down. I
find this a desirable feature, as I like to keep like columns grou
Is there a way to change the order of columns in a table in Postgres
after it has been created? Back when I used MS SQL Server, it was
trivial to go into Enterprise Manager and move columns up and down. I
find this a desirable feature, as I like to keep like columns grouped in
my table. Some
17 matches
Mail list logo