SQL schema for radcheck table

Arran Cudbard-Bell a.cudbardb at freeradius.org
Wed Jan 15 22:11:31 CET 2014


On 15 Jan 2014, at 20:58, Matt Zagrabelny <mzagrabe at d.umn.edu> wrote:

> Greetings,
> 
> Looking at the file raddb/mods-config/sql/main/postgresql/schema.sql
> in the git repo, I see:
> 
> CREATE TABLE radcheck (
>    id          serial PRIMARY KEY,
>    UserName        text NOT NULL DEFAULT '',
>    Attribute       text NOT NULL DEFAULT '',
>    op          VARCHAR(2) NOT NULL DEFAULT '==',
>    Value           text NOT NULL DEFAULT ''
> );
> 
> Is the "id" field used by FR? Or does it exist for administration of
> the table in case someone enters two records with identical (UserName,
> Attribute, op, Values) values?

Administration. Some tools (like pgAdmin) won't operate on a table unless there's a primary key.

Primary key could be UserName, Attribute, Op, Value, but there are some cases (using -=, or += for example) where two or more identical rows could exist.

Arran Cudbard-Bell <a.cudbardb at freeradius.org>
FreeRADIUS Development Team

FD31 3077 42EC 7FCD 32FE 5EE2 56CF 27F9 30A8 CAA2

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 881 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.freeradius.org/pipermail/freeradius-users/attachments/20140115/03b01fdb/attachment-0001.pgp>


More information about the Freeradius-Users mailing list