Re: [SQL] Migrating a Database to a new tablespace

2006-04-25 Thread Tom Lane
Markus Schaber <[EMAIL PROTECTED]> writes: > Tom Lane wrote: >> Instead of assuming anything, why don't you look in the tablespace >> directory and see what's there? A quick "ls -aR" would give more >> information than guessing. > There's plenty of stuff there, 8.8 Gigabytes in total. The questio

Re: [SQL] Migrating a Database to a new tablespace

2006-04-25 Thread Markus Schaber
Hi, Tom, Tom Lane wrote: >>So when pgadmin3 displays no dependencies, can I assume it is safe to >>empty the tablespace directory manually, and then drop the tablespace? > > Instead of assuming anything, why don't you look in the tablespace > directory and see what's there? A quick "ls -aR" wou

Re: [SQL] Migrating a Database to a new tablespace

2006-04-25 Thread Tom Lane
Markus Schaber <[EMAIL PROTECTED]> writes: > So when pgadmin3 displays no dependencies, can I assume it is safe to > empty the tablespace directory manually, and then drop the tablespace? Instead of assuming anything, why don't you look in the tablespace directory and see what's there? A quick "l

Re: [SQL] Migrating a Database to a new tablespace

2006-04-25 Thread Markus Schaber
Hi, Jim, Jim C. Nasby wrote: > That means that the tablespace directory isn't empty. This might be some artifacts from backend kills / crashes, partially during COPY and CREATE DATABASE operations. (It's a developer machine after all). So when pgadmin3 displays no dependencies, can I assume it i

Re: [SQL] SELECTing into usertype, how to do it?

2006-04-25 Thread A. Kretschmer
am 25.04.2006, um 14:25:50 +0200 mailte Mario Splivalo folgendes: > > > > select into type_var col_a, col_b from table_a ... ; > > > > Thnx... still, that SELECT INTO looks pretty anoying... it would be neat > to type just: > type_var := col_a, col_b FROM ... well-nigh: type_va

Re: [SQL] SELECTing into usertype, how to do it?

2006-04-25 Thread Mario Splivalo
On Tue, 2006-04-25 at 14:21 +0200, A. Kretschmer wrote: > am 25.04.2006, um 14:03:07 +0200 mailte Mario Splivalo folgendes: > > > > And then, when I want to fill in the type_var, i do this: > > > > type_var.member_a := col_a FROM table_a WHERE col_c = 5; > > type_var.member_b := col_b FR

Re: [SQL] SELECTing into usertype, how to do it?

2006-04-25 Thread A. Kretschmer
am 25.04.2006, um 14:03:07 +0200 mailte Mario Splivalo folgendes: > > And then, when I want to fill in the type_var, i do this: > > type_var.member_a := col_a FROM table_a WHERE col_c = 5; > type_var.member_b := col_b FROM table_a WHERE col_c = 5; > > Is there a way to fill in the t

[SQL] SELECTing into usertype, how to do it?

2006-04-25 Thread Mario Splivalo
I have a type, declared like this: CREATE TYPE type_a AS ( member_a varchar, member_b bool ); There is also a table: CREATE TABLE table_a ( col_a varchar, col_b bool, col_c int4 ); Now, in a function, I declared type_var variable of type type_a: DECLARE