Question

I have a table in my Postgres database with columns named "type", "desc", and "start". When I call $dbh->column_info, only "desc" comes back quoted, whereas in pgAdmin all three of them are quoted. Is one of them wrong?

Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top