Re: [HACKERS] Re: [SQL] Column name's length

From: wieck(at)debis(dot)com (Jan Wieck)
To: vadim(at)krs(dot)ru (Vadim Mikheev)
Cc: jwieck(at)debis(dot)com, lockhart(at)alumni(dot)caltech(dot)edu, tgl(at)sss(dot)pgh(dot)pa(dot)us, pgsql-hackers(at)postgreSQL(dot)org, zalman(at)netcom(dot)com
Subject: Re: [HACKERS] Re: [SQL] Column name's length
Date: 1999-06-02 10:05:48
Message-ID: m10p7u8-0003kGC@orion.SAPserv.Hamburg.dsh.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

>
> Jan Wieck wrote:
> >
> > >
> > > I understand some folks think this is a problem, but have been
> > > reluctant to include a "randomizer" in the created index name since it
> > > would make the index name less clearly predictable. May as well use
> > > something like "idx_<procid>_<timestamp>" or somesuch...
> > >
> > > No real objection though, other than aesthetics. And those only count
> > > for so much...
> >
> > I've been wondering for some time why at all to build the
>
> And me -:)
>
> > index and sequence names from those table/fieldnames. Only to
> > make them guessable?
> >
> > What about building them from the tables OID plus the column
> > numbers. That way, auto created sequences could also be
> > automatically removed on a DROP TABLE because the system can
> > "guess" them.
>
> Actually, we should use names not allowed in CREATE statements!
> So I would use "pg_" prefix...

This would implicitly deny the user from dropping the created
index for a unique constraint :-) Same for the sequences -
what's good because they are used in the default clauses for
the serial field and dropping the sequence would corrupt the
table though.

I like it.

Jan

--

#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#======================================== jwieck(at)debis(dot)com (Jan Wieck) #

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Jan Wieck 1999-06-02 10:11:27 Re: Rules puzzle with "current" keyword.
Previous Message Vadim Mikheev 1999-06-02 09:57:03 Re: [HACKERS] Open 6.5 items