Re: [SQL] select based on multi-column primary keys

2007-01-21 Thread Andrew Sullivan
On Fri, Jan 19, 2007 at 07:45:40PM -0800, codeWarrior wrote: > AFAIK: You cannot have multiple primary keys. How would you know which one > is the actual key ? You can have a multi-column primary key, though. That's a perfectly legitimate approach. > FYI: What you are really talking about are t

[SQL] Changing point for commas and commas for point

2007-01-21 Thread Ezequias Rodrigues da Rocha
Hi list, Here in my country (Brazil) we have the decimal simbol as ' , ' (commas) and thousand separator as ' . ' (point) Here my sql uses: to_char(sum(My_column), '0D00') Is there any way to make this happens ? Regards -- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

Re: [SQL] Changing point for commas and commas for point

2007-01-21 Thread Tom Lane
"Ezequias Rodrigues da Rocha" <[EMAIL PROTECTED]> writes: > Here in my country (Brazil) we have the decimal simbol as ' , ' (commas) and > thousand separator as ' . ' (point) > Here my sql uses: to_char(sum(My_column), '0D00') That's the right thing. > Is there any way to make this happens

Re: [SQL] Changing point for commas and commas for point

2007-01-21 Thread Andreas Kretschmer
Ezequias Rodrigues da Rocha <[EMAIL PROTECTED]> schrieb: > Hi list, > > Here in my country (Brazil) we have the decimal simbol as ' , ' (commas) and > thousand separator as ' . ' (point) > > Here my sql uses: to_char(sum(My_column), '0D00') > > Is there any way to make this happens ? I t

[SQL] Possible to emulate pre-8.2 behaviour of SET CONSTRAINTS?

2007-01-21 Thread Simon Kinsella
Hi My system currently runs on PostgreSQL 8.1 and makes use of the old behaviour of SET CONSTRAINTS, namely that the command is applied to all constraints that match the specified name. This makes it very easy to write a general-case function that can change the DEFERRED mode on a given constrain

Re: [SQL] Possible to emulate pre-8.2 behaviour of SET CONSTRAINTS?

2007-01-21 Thread Tom Lane
"Simon Kinsella" <[EMAIL PROTECTED]> writes: > My system currently runs on PostgreSQL 8.1 and makes use of the old > behaviour of SET CONSTRAINTS, namely that the command is applied to all > constraints that match the specified name. Unfortunately that was pretty far away from what the SQL spec sa

[SQL] list variable attributes in one select

2007-01-21 Thread Louis-David Mitterrand
Hello, I've got the following tables: person: - id_person - firstname - lastname - type person_to_type: - id_person references person - type references person_type; person_type: - type "person_type" contains differents caracteristics for a person (actor, director, author, etc.) who can have s