NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.
All the Perl that's Practical to Extract and Report
Stories, comments, journals, and other submissions on use Perl; are Copyright 1998-2006, their respective owners.
Array types (Score:2)
This would store a list of email addresses as a single object. Or have I missed the point again?
In other news, I'm surprised PostgreSQL doesn't have an "email_address" type. It seems to have everything else.
Reply to This
Re:Array types (Score:2)
You can create one easily enough with a
CREATE DOMAINstatement. Here's a naive implementation:Modify the regular expression as needed to increase its accuracy. Then you can use it like any other PostgreSQL data type:
Re:Array types (Score:2)
As Theory points out, you can create such a type. The problem is that if anything else needs to reference data within that type, Postgres does not allow any convenient way of doing so. This makes it pretty difficult to use Postgres for MV purposes.
Re:Array types (Score:1)
It sounds like PostgreSQL even automatically makes a composite type for each table
Re:Array types (Score:1)
Re:Array types (Score:2)
The problem with CRUD on a single email address goes away if you have a language which supports that. SQL does not. While I confess that I don't remember my UniQuery (the query language for the MV database I used), imagine something like this:
In other words, DELETE would operate on more than just tuples.
How about searching for a particular email? Well, you show some sample syntax above.
There are plenty of oth