Hacker News new | past | comments | ask | show | jobs | submit login

You could write a pl/pgsql function that does that mapping for you. For example, insert into some_table values (intern(str), …) where intern can insert and return the intern_id from your intern_table. For select statements and joins you could use interned(str) that only does select without insert.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: