I have a table in my pgsql database with columns named "type", "desc", and "start". When I call $dbh->column_info
, only "desc" comes back quoted, whereas in pgAdmin3 all three of them are quoted. Is one of them wrong?
views:
132answers:
1
+2
A:
I think I kind of answered my own question, but I thought I'd put it on here in case anyone has more insight. The reserve list shows "desc" is the only actually reserved keyword (the other two: 'we classify as "non-reserved" those key words that are explicitly known to the parser but are allowed as column or table names'), so my guess is that pgAdminIII is being cautious and quoting in case "type" and "start" become reserved some day.
Kev
2008-10-27 16:00:27
Sounds like the right conclusion. You could use 'delimited identifiers' (the technical name for column names in quotes) everywhere; it is simpler not to.
Jonathan Leffler
2008-10-27 16:12:46
True, I only use them where I have to.
Kev
2008-10-27 18:00:39