Skip site navigation (1) Skip section navigation (2)

Re: Nombre de la Base de Datos con Numeros

From: Alvaro Herrera <alvherre(at)dcc(dot)uchile(dot)cl>
To: jonathan sepulveda <jonathanspb(at)yahoo(dot)com>
Cc: pgsql-es-ayuda(at)postgresql(dot)org
Subject: Re: Nombre de la Base de Datos con Numeros
Date: 2004-09-27 14:52:41
Message-ID: 20040927145241.GA4291@dcc.uchile.cl (view raw or flat)
Thread:
Lists: pgsql-es-ayuda
On Mon, Sep 27, 2004 at 09:41:46AM -0500, jonathan sepulveda wrote:

Hola,

> 
>              Quisiera saber si se pueden crear bases
> de datos en la cual el nombre se un numero como por
> ejemplo: create database 187;
> 
> pd: hice una prueba y me salio el siguiente error:
> ERROR:  syntax error at or near "187" at character 17

El siguiente paso es ver lo que dice la documentacion:

http://www.postgresql.org/docs/7.4/static/sql-syntax.html

SQL  identifiers  and key words must begin with a letter (a-z, but also
letters with diacritical marks and non-Latin letters) or an underscore
(_). Subsequent characters in an identifier or key word can be letters,
underscores,  digits  (0-9),  or dollar signs ($). Note that dollar
signs are not allowed in identifiers  according  to  the letter of the
SQL standard, so their use may render applications less portable.  The
SQL standard will not define a key word that contains digits or starts
or ends with an underscore,  so  identifiers of this form are safe
against possible conflict with future extensions of the standard.

-- 
Alvaro Herrera (<alvherre[a]dcc.uchile.cl>)
"Some men are heterosexual, and some are bisexual, and some
men don't think about sex at all... they become lawyers" (Woody Allen)


In response to

pgsql-es-ayuda by date

Next:From: Viviana SanchezDate: 2004-09-27 15:05:28
Subject: cuestion de tiempos
Previous:From: jonathan sepulvedaDate: 2004-09-27 14:41:46
Subject: Nombre de la Base de Datos con Numeros

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group