Search Postgresql Archives

Re: type aliases

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

 



> 
> You probably should define your domain like this:
> 
>    CREATE DOMAIN myvarchar varchar(42);
> 

That's what I thought, so it won't do what I want. I need to be able to set the length at the time of declaration.

So suppose I wanted to implement myvarchar in C. In my _in function, how do I know how big my column declaration is? Eg if someone tries to insert 50 characters into my 42 character field, how do I get the declared length and then tell postgres that the data to be inserted is too big?
 
Thanks

James



-- 
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