Re: [SQL] spliting a row to make several rows

2006-10-12 Thread Gerardo Herzig
Cool!! Thanks a lot! I will try it as soon as possible Gerardo Gerardo Herzig wrote: Hi all: What a want to do is something like this: suppose i have this record aa--bb--cc I guess if im able to do some sql/plsql procedure to get something like it aa bb cc (3 records, rigth?) Thanks a lo

Re: [SQL] spliting a row to make several rows

2006-10-12 Thread Bricklen Anderson
Gerardo Herzig wrote: Hi all: What a want to do is something like this: suppose i have this record aa--bb--cc I guess if im able to do some sql/plsql procedure to get something like it aa bb cc (3 records, rigth?) Thanks a lot Gerardo dev=#select split_to_rows('aa--bb--cc','--'); split_to_

[SQL] spliting a row to make several rows

2006-10-12 Thread Gerardo Herzig
Hi all: What a want to do is something like this: suppose i have this record aa--bb--cc I guess if im able to do some sql/plsql procedure to get something like it aa bb cc (3 records, rigth?) Thanks a lot Gerardo ---(end of broadcast)--- TIP 9: I

Re: [SQL] Is this a bug? Deleting a column deletes the constraint.

2006-10-12 Thread Florian Weimer
* Tom Lane: > The CREATE TABLE reference page further amplifies: > > PostgreSQL allows a table of no columns to be created (for example, > CREATE TABLE foo();). This is an extension from the SQL standard, which > does not allow zero-column tables. Zero-column tables are not in > themselves

Re: [SQL] Is this a bug? Deleting a column deletes the constraint.

2006-10-12 Thread Chris Browne
[EMAIL PROTECTED] (Joe) writes: > On Thu, 2006-10-12 at 01:25 -0400, Tom Lane wrote: >> It does seem like this is wrong, in view of SQL92's statement about >> ALTER TABLE DROP COLUMN: >> >> 4) If RESTRICT is specified, then C shall not be referenced in >> the of any view desc

Re: [SQL] Is this a bug? Deleting a column deletes the constraint.

2006-10-12 Thread Tom Lane
Joe <[EMAIL PROTECTED]> writes: > I didn't realize before that you can also drop all columns, leaving a > table without *any* columns. Is that a SQL92 "feature"? See the ALTER TABLE reference page: ALTER TABLE DROP COLUMN can be used to drop the only column of a table, leaving a zero-column

Re: [SQL] Is this a bug? Deleting a column deletes the constraint.

2006-10-12 Thread Joe
On Thu, 2006-10-12 at 01:25 -0400, Tom Lane wrote: > It does seem like this is wrong, in view of SQL92's statement about > ALTER TABLE DROP COLUMN: > > 4) If RESTRICT is specified, then C shall not be referenced in > the of any view descriptor or in the condition