[SQL] how to tell if column set on update

2009-07-20 Thread chester c young
within a trigger need to know if the UPDATE statement set a column. the column might be set to the old value or a different value. (want to make sure the app is sending all necessary values) thanks -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to yo

[SQL] unused columns in copy

2009-07-20 Thread chester c young
is there a way for COPY FROM to ignore unused columns in CSV? in other words, if table t1 has columns c1, c2, and if csv has columns c1, c3, c2, could I do something like COPY t1( c1, null, c2 ) FROM 'file.csv' -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make cha

Re: [SQL] Table inheritance problem

2009-07-20 Thread Andreas Wenk
Gianvito Pio schrieb: Hello, I have 3 tables: persons, operators and persons_position. This is a semplified examples of their structures: CREATE TABLE persons (id varchar NOT NULL, CONSTRAINT "PK_Persons" PRIMARY KEY(id)); CREATE TABLE operators (id varchar NOT NULL, CONSTRAINT "PK_Oper

Re: [SQL] unused columns in copy

2009-07-20 Thread Marcin Stępnicki
On Mon, Jul 20, 2009 at 3:22 PM, chester c young wrote: > > is there a way for COPY FROM to ignore unused columns in CSV? > > in other words, if table t1 has columns c1, c2, and if csv has columns c1, > c3, c2, could I do something like > > COPY t1( c1, null, c2 ) FROM 'file.csv' No, but you can

Re: [SQL] how to tell if column set on update

2009-07-20 Thread nha
Hello, Le 20/07/09 15:19, chester c young a écrit : > within a trigger need to know if the UPDATE statement set a column. the > column might be set to the old value or a different value. > > (want to make sure the app is sending all necessary values) > > thanks > If the column to test is kno

Re: [SQL] unused columns in copy

2009-07-20 Thread nha
Hello, Le 21/07/09 0:59, Marcin Stępnicki a écrit : > On Mon, Jul 20, 2009 at 3:22 PM, chester c young > wrote: >> is there a way for COPY FROM to ignore unused columns in CSV? >> >> in other words, if table t1 has columns c1, c2, and if csv has columns c1, >> c3, c2, could I do something like >

[SQL] Storing/sorting hex data in PostgreSQL

2009-07-20 Thread JJ
I am parsing a map file and storing the hi, mid and low byte values of symbol addresses in a comma separated value (.csv) file. I am then importing this data into a PostgreSQL database with the copy command. The problem is that I want to sort and query the database based on the hex addresses; fr