Re: Unique UUID value - PostgreSQL 9.2
| От | David G. Johnston | 
|---|---|
| Тема | Re: Unique UUID value - PostgreSQL 9.2 | 
| Дата | |
| Msg-id | CAKFQuwZOrs--MPnLsF2uHWzyQ2xvFbsvyRGTC7Ojq3eJTuFrag@mail.gmail.com обсуждение исходный текст  | 
		
| Ответ на | Re: Unique UUID value - PostgreSQL 9.2 ("drum.lucas@gmail.com" <drum.lucas@gmail.com>) | 
| Ответы | 
                	
            		Re: Unique UUID value - PostgreSQL 9.2
            		
            		 | 
		
| Список | pgsql-general | 
Not reading the documentation for functions you've never heard of makes the list.David J.INSERT INTO junk.test1 (account_id, code, info) SELECT account_id, uuid_generate_v4(), info FROM junk.test2;It works but I get data like:
abc77f31-0ee6-44fd-b954-08a3a3aa7b28 f307fb42-23e5-4742-ab8f-8ce5c0a8e852Is it possible to do the same, but with TEXT on the beginning?
Example:
test_32152563bdc4db11aatest_321525694417ad6b5f
Yes, it is possible.  Did you even try?  
"test" in that example is called a string.  There are bunch of functions and operators that work with strings.  They are documented here:
You'll find the ones that "concatenate" - which basically is a fancy way to say: "to combine" or "to join together" - to be quite useful when faced with problems of this sort.
David J.
В списке pgsql-general по дате отправления: