Re: existence of column name - Mailing list pgsql-general

From Eric Smith
Subject Re: existence of column name
Date
Msg-id D392651E-56C7-4AE9-BA5E-E9EA85EECAC4@mac.com
Whole thread Raw
In response to Re: existence of column name  (John R Pierce <pierce@hogranch.com>)
Responses Re: existence of column name
List pgsql-general
Tried this out, and got a very familiar error that I don't know what
to do with :  "Error: expected just one rule action".

I'm using 8.3.5, and see this error quite a bit.  Anyone know what's
behind this error?

Thanks,
Eric

On Apr 8, 2009, at 8:54 PM, John R Pierce wrote:

> Eric Smith wrote:
>> All,
>>
>> From the C API, how do I check for the existence of a column name
>> in a given table?
>
>   select data_type from information_schema.columns where
> table_schema='public' and table_name='given_table' and
> column_name='some_column';
>
> that will return the data_type if the column exists, or return zero
> rows if it doesn't.
>
>


pgsql-general by date:

Previous
From: mrLami
Date:
Subject: Re: PgAdmin & PosgreSQL Plus Setup
Next
From: Tom Lane
Date:
Subject: Re: existence of column name