> SELECT * FROM iopoints WHERE systemid=123 AND enclosureid='ab' AND pointid=56
A slight variation of the syntax would be:
select * from iopoints where (systemid, enclosureid, pointid) = (123,'ab',56);
this table and fields sounds alot like a control system be being modeled. :-)
Regards,
Richa
--
AFAIK: You cannot have multiple primary keys. How would you know which one
is the actual key ?
FYI: What you are really talking about are table contraints... When you have
multiple unique column constraints -- they are generally referred to as
"table constraints" not multiple primary keys
On Fri, Jan 19, 2007 at 16:44:50 -0800,
mawrya <[EMAIL PROTECTED]> wrote:
> I have set up a table with a multi-column primary key constraint:
>
> If I had a row in the table where systemid=123, enclosureid=ab,
> pointid=56, I would have a Primary Key ("ID") of 123ab56 for that row.
>
> I now w
I have set up a table with a multi-column primary key constraint:
CREATE TABLE iopoints
(
enclosureid numeric(3) NOT NULL,
pointid char(4) NOT NULL,
equipmentgroup varchar(64) NOT NULL,
deviceid varchar(8),
devicetype varchar(24),
operationdesc varchar(64) NOT NULL,
entrytime timestamp NOT
On Fri, Jan 19, 2007 at 07:11:00PM +, [EMAIL PROTECTED] wrote:
> I now want to know if the user/role has permision
> to the schema.table.
>
> How do I query to pgsql to know what permissions a
> particular user has on the table?
Start here:
http://www.postgresql.org/docs/8.1/interactive/func
Hi all,
still working on dabo a bit. Thanks for all the
earlier suggestions, they are working well.
I now want to know if the user/role has permision
to the schema.table.
How do I query to pgsql to know what permissions a
particular user has on the table?
I was thinking something along the line
You mean like this:
CREATE OR REPLACE VIEW sys_tabledef AS
SELECT columns.table_catalog, columns.table_schema, columns.table_name,
columns.column_name, columns.ordinal_position, columns.column_default,
columns.is_nullable, columns.data_type, columns.character_maximum_length,
columns.character
> I am trying to modify the dabo (a python wxpython
> ide for database forms creation) code to allow the
> selection of tables in any schema. I need a query
> that will return records with schema, table,
> columname and columne type.
create view pg_cols as select
s.nspname as schema_nm,
On Fri, Jan 19, 2007 at 12:41:19 +,
[EMAIL PROTECTED] wrote:
> For background I am selecting table & schema by
> the query:
> SELECT schemaname || '.' || tablename AS tablename
> FROM pg_tables ORDER BY tablename;
Are you guaranteed that all of the names are lower case? If not you may want
t
Hi all,
I think I have fixed my own problem. At:
http://developer.postgresql.org/~momjian/upgrade_tips_7.3
I found the answer which was:
SELECT a.attrelid as oid, a.attname, t.typname
FROM pg_attribute a inner join pg_type t on
a.atttypid = t.oid
WHERE a.attrelid = 'co.hole_tes
Dnia Wed, 17 Jan 2007 13:04:28 +, Richard Huxton napisał(a):
> That'd be my guess. And then it's not fetching any rows, expecting
> cursor-like behaviour. Of course we fetch all the rows before returning
> any results.
>
> The real solution would be to add "LIMIT 0" or "LIMIT 1" to the
> c
Hi all,
I am trying to modify the dabo (a python wxpython
ide for database forms creation) code to allow the
selection of tables in any schema. I need a query
that will return records with schema, table,
columname and columne type.
For background I am selecting table & schema by
the query:
SELEC
12 matches
Mail list logo