Re: How do I create a drop down list?

From: Bartosz Dmytrak <bdmytrak(at)eranet(dot)pl>
To: MrTeeth <lateefnation(at)gmail(dot)com>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: How do I create a drop down list?
Date: 2012-03-15 21:54:51
Message-ID: CAD8_UcZB=2uNcPG_6WQBEin0ULEPHHo6efO9UHSGq0ZSd0AKHQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

hi,
I think You use MS Access before.
It is not possible to create such drop down list using pgAdmin, but it is
possible to limit acceptable values in field "student_type" in few
different ways. Still this will not be a drop-down or combobox filed.

eg:
You can use table with dictionary and then use foreign key,
You can use constraint to check inserted value
You can use domain (field is in type of Your domain, and domain is based on
proper constraint)
You can use trigger (before insert or update)
etc.

Regards,
Bartek

2012/3/15 MrTeeth <lateefnation(at)gmail(dot)com>

> Hi guys,
>
> I'm new to PostgreSQL.
>
> I was wondering, how do I make a column a drop down list.
>
> So i've got a table called Student. There's a column in there called
> "student_type", which means whether the student is a part time student,
> full
> time student or is sandwich course student.
>
> So I want to make "student_type" a drop down list with 3 choices: "part
> time" student, "full time" and "sandwich".
>
> How do I do this?
>
> (I'm using pgAdmin to create the databse, by the way.)
>
> --
> View this message in context:
> http://postgresql.1045698.n5.nabble.com/How-do-I-create-a-drop-down-list-tp5569184p5569184.html
> Sent from the PostgreSQL - novice mailing list archive at Nabble.com.
>
> --
> Sent via pgsql-novice mailing list (pgsql-novice(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-novice
>

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Bartosz Dmytrak 2012-03-15 22:03:51 Re: repeatet summary querys per month over 5 years
Previous Message VARTAK, SATISH CTR DFAS 2012-03-15 20:33:50 SQL odbc driver for Windows 7 (64 bit) - database Postgres version 8.3