On Wednesday 31 March 2004 16:31, Alexander Cohen wrote:
> is it possible to have postgres return a "SELECT * FROM table ORDER BY
> table_column" query that is not case sensitive order?
SELECT first_name FROM foo ORDER BY lower(first_name)
Of course, then you can't guarantee whether you get "Alex" then "alex" or the
other way around, so you might want:
SELECT first_name FROM foo ORDER BY lower(first_name), first_name
> Also, i noticed that postgres will let me create groups, databases and
> users with spaces in their names, is this ok or should i check this
> beforehand and not allow this?
You need to quote the names to create them this way. If you do so, you need to
quote them when you use them, so:
CREATE MyTable / SELECT FROM mytable/MYTABLE/MyTaBle...
CREATE "MyTable" / SELECT FROM "MyTable"
--
Richard Huxton
Archonet Ltd