Re: How do I create a drop down list? - Mailing list pgsql-novice

From Bartosz Dmytrak
Subject Re: How do I create a drop down list?
Date
Msg-id CAD8_UcZB=2uNcPG_6WQBEin0ULEPHHo6efO9UHSGq0ZSd0AKHQ@mail.gmail.com
Whole thread Raw
In response to How do I create a drop down list?  (MrTeeth <lateefnation@gmail.com>)
Responses Re: How do I create a drop down list?  (MrTeeth <lateefnation@gmail.com>)
Re: How do I create a drop down list?  (Lew <noone@lewscanon.com>)
List 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@gmail.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@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-novice

pgsql-novice by date:

Previous
From: "VARTAK, SATISH CTR DFAS"
Date:
Subject: SQL odbc driver for Windows 7 (64 bit) - database Postgres version 8.3
Next
From: Bartosz Dmytrak
Date:
Subject: Re: repeatet summary querys per month over 5 years