On Sat, Mar 12, 2005 at 10:41:08 +,
ILove TheSpam <[EMAIL PROTECTED]> wrote:
> Lets say I have 3 tables:
>
> surnames - surnameid serial (Primary Key), surname varchar (Unique)
> firstnames - firstnameid serial (Primary Key), firstname varchar (Unique)
> users - userid serial (Primary Key),
Could you describe the problem you're trying to solve? It might
be easier to help if we knew the ultimate purpose of what you're
trying to do. Something like "I want to do this because"
Sure.
Lets say I have 3 tables:
surnames - surnameid serial (Primary Key), surname varchar (Unique)
firstna
On Fri, Mar 11, 2005 at 04:21:49PM +, ILove TheSpam wrote:
> My problem is that I want to:
> a) Be able to detect when an error occurs and be able to read that error
> b) Find out the FieldID for the row which already has the value in it. So
> if I try to enter 'blah' into FieldValue and it's
Hi,
I'm new to Postgres and plpgsql so my sincerest apologies if the answer to
my problem is common :-)
I want to add entries to a table. The table has 2 fields, FieldID which is
the primary key and FieldValue which is a unique field.
I can add to FieldValue just fine when the unique constraint h
Wilson" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Sunday, November 19, 2000 10:14 AM
Subject: Re: [GENERAL] unique indexes
> "Dan Wilson" <[EMAIL PROTECTED]> writes:
> > Here is the query from phpPgAdmin that does what you
"Dan Wilson" <[EMAIL PROTECTED]> writes:
> Here is the query from phpPgAdmin that does what you are asking for:
> SELECT
>...
>and
>(
> i.indkey[0] = a.attnum
> or
> i.indkey[1] = a.attnum
> or
> i.indkey[2] = a.attnum
> or
> i.indkey[3] = a.attnum
>
s" <[EMAIL PROTECTED]>
To: "Stephan Szabo" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Sunday, November 19, 2000 8:42 AM
Subject: [GENERAL] unique indexes
> Hi,
>
> Thankyou for your help with pg_trigger :)
>
> I am trying to list the indexe
Hi,
Thankyou for your help with pg_trigger :)
I am trying to list the indexes for a table. So far I've come up with this SQL
query:
SELECT bc.relname AS TABLE_NAME,
a.attname AS COLUMN_NAME,
a.attnum as KEY_SEQ,
ic.relname as PK_NAME
FROM pg_class bc, pg_class ic, pg_index i, pg_attribute a
WH