Search Postgresql Archives

workarounds for ci_text

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

As far as I can tell, you can't restrict the length of a ci_text field like
char(5) or varchar(5)?
Let's say you got a stock table and you want an alphanumeric stock
code that is the primary key but it must be case insensitive can I do
something like this:

create table stock(stock code varchar(5), stock_desc varchar(50))
primary key pk_stock_code ilike(stock_code)

Will this work? Is this the right syntax?

Thanks

H.F.


-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux