Re: Table name lengths...
| От | Alvaro Herrera |
|---|---|
| Тема | Re: Table name lengths... |
| Дата | |
| Msg-id | 20030902174615.GJ21909@dcc.uchile.cl обсуждение |
| Ответ на | Re: Table name lengths... (Chris Bowlby <excalibur@hub.org>) |
| Ответы |
Re: Table name lengths...
|
| Список | pgsql-general |
On Tue, Sep 02, 2003 at 02:33:00PM -0300, Chris Bowlby wrote:
> On Tue, 2003-09-02 at 14:24, Richard Huxton wrote:
>
> I'm working with an application that needs to be able to determine this
> depending on the version of PostgreSQL that is running. I know what
> anything less then 7.3 was 32 characters and anything newer is currently
> 64, but I'm hoping to be able to check the lengths from my application
> before creating a table/sequence/index, etc..
Cast a long string to the name type and measure its length:
test=> SELECT length(repeat('xyzzy', 100)::name);
length
--------
63
(1 row)
--
Alvaro Herrera (<alvherre[a]dcc.uchile.cl>)
Voy a acabar con todos los humanos / con los humanos yo acabaré
voy a acabar con todos / con todos los humanos acabaré (Bender)
В списке pgsql-general по дате отправления: