pg.ddx.io pgsql-sql@postgresql.org mailing list archive
help / color / mirror / Atom feeddoes table names have a format and size
4+ messages / 4 participants
[nested] [flat]
* does table names have a format and size
@ 2002-09-13 23:04 jaya prakash <prakashrj@hotmail.com>
2002-09-16 13:46 ` Re: does table names have a format and size Michael Paesold <mpaesold@gmx.at>
2002-09-16 15:03 ` Re: does table names have a format and size Stephan Szabo <sszabo@megazone23.bigpanda.com>
0 siblings, 2 replies; 4+ messages in thread
From: prakashrj@hotmail.com @ 2002-09-13 23:04 UTC (permalink / raw)
To: pgsql-sql
Hi,
Is the name of the table important in psql... because the following
create table command doesn't create any table in the database but the
next sql command with a different table name creates the table.
Is there any table name convention in postgres.
create table IL18R---_PGA_SNPs666 (contig char(10),contig_pos
char(10),read_pos char(10),chromat char(30),sample char(30),allele1
char(20),allele2 char(20),ref_pos char(10),ref_sample char(10),tag
char(100),source char(10));
following command works well...
create table MD1_PGA_SNPs666 (contig char(10),contig_pos
char(10),read_pos char(10),chromat char(30),sample char(30),allele1
char(20),allele2 char(20),ref_pos char(10),ref_sample char(10),tag
char(100),source char(10));
thanks
Prakash
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: does table names have a format and size
2002-09-13 23:04 does table names have a format and size jaya prakash <prakashrj@hotmail.com>
@ 2002-09-16 13:46 ` Michael Paesold <mpaesold@gmx.at>
2002-09-17 01:28 ` Re: does table names have a format and size Christopher Kings-Lynne <chriskl@familyhealth.com.au>
1 sibling, 1 reply; 4+ messages in thread
From: Michael Paesold @ 2002-09-16 13:46 UTC (permalink / raw)
To: pgsql-sql
jaya prakash wrote
> Is the name of the table important in psql... because the following
> create table command doesn't create any table in the database but the
> next sql command with a different table name creates the table.
>
> Is there any table name convention in postgres.
>
> create table IL18R---_PGA_SNPs666 (contig char(10),contig_pos
> char(10),read_pos char(10),chromat char(30),sample char(30),allele1
> char(20),allele2 char(20),ref_pos char(10),ref_sample char(10),tag
> char(100),source char(10));
I believe the hyphen "-" character is not allowed in a table name.
Only letters, numbers, underscore "_".
Regards, Michael
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: does table names have a format and size
2002-09-13 23:04 does table names have a format and size jaya prakash <prakashrj@hotmail.com>
2002-09-16 13:46 ` Re: does table names have a format and size Michael Paesold <mpaesold@gmx.at>
@ 2002-09-17 01:28 ` Christopher Kings-Lynne <chriskl@familyhealth.com.au>
0 siblings, 0 replies; 4+ messages in thread
From: Christopher Kings-Lynne @ 2002-09-17 01:28 UTC (permalink / raw)
To: Michael Paesold <mpaesold@gmx.at>; pgsql-sql
> > Is the name of the table important in psql... because the following
> > create table command doesn't create any table in the database but the
> > next sql command with a different table name creates the table.
> >
> > Is there any table name convention in postgres.
> >
> > create table IL18R---_PGA_SNPs666 (contig char(10),contig_pos
> > char(10),read_pos char(10),chromat char(30),sample char(30),allele1
> > char(20),allele2 char(20),ref_pos char(10),ref_sample char(10),tag
> > char(100),source char(10));
>
> I believe the hyphen "-" character is not allowed in a table name.
> Only letters, numbers, underscore "_".
I think you can probably quote the name to have it work:
create table "IL18R---_PGA_SNPs666" (contig cha...
Chris
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: does table names have a format and size
2002-09-13 23:04 does table names have a format and size jaya prakash <prakashrj@hotmail.com>
@ 2002-09-16 15:03 ` Stephan Szabo <sszabo@megazone23.bigpanda.com>
1 sibling, 0 replies; 4+ messages in thread
From: Stephan Szabo @ 2002-09-16 15:03 UTC (permalink / raw)
To: jaya prakash <prakashrj@hotmail.com>; +Cc: pgsql-sql
On 13 Sep 2002, jaya prakash wrote:
> Hi,
> create table command doesn't create any table in the database but the
> next sql command with a different table name creates the table.
>
> Is there any table name convention in postgres.
>
> create table IL18R---_PGA_SNPs666 (contig char(10),contig_pos
> char(10),read_pos char(10),chromat char(30),sample char(30),allele1
> char(20),allele2 char(20),ref_pos char(10),ref_sample char(10),tag
> char(100),source char(10));
I believe - isn't a valid unquoted identifier character.
You can either do "IL18R---_PGA_SNPs666" and always quote the name
or don't use - characters.
I think only letters _ and numbers can be used unquoted (and numbers
can't start), but I haven't checked.
^ permalink raw reply [nested|flat] 4+ messages in thread
end of thread, other threads:[~2002-09-17 01:28 UTC | newest]
Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2002-09-13 23:04 does table names have a format and size jaya prakash <prakashrj@hotmail.com>
2002-09-16 13:46 ` Michael Paesold <mpaesold@gmx.at>
2002-09-17 01:28 ` Christopher Kings-Lynne <chriskl@familyhealth.com.au>
2002-09-16 15:03 ` Stephan Szabo <sszabo@megazone23.bigpanda.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox