[SQL] from not null field to nullable field?

2000-07-19 Thread Carolyn Lu Wong
I have a field in a table that has been defined 'not null'. Is it possible to remove this constraint? I don't see this option under 'alter table'.

[SQL] synchronizing databases

2000-07-19 Thread Nathan Young
Hi. Again, I'm posting to this list because none of the other postgres lists seem quite right for the topic. Excuse me if I'm off topic. I'm writing an application and I'd like to have the data that application uses to be uninterrupted in case the database server fails (fail over). Likewise, w

Re: [SQL] Order by in Select

2000-07-19 Thread Stephan Szabo
> What can I add to the above sql statement so that is fetches the > specified id first in a sorted list? > > eg: if $specified_id=5; > I want: 5,5,5,1,2,3,3,4,4,4,6,6,7 > > I could have done it in two different sql statements where one fetches > specified_id and the other fetches and sorts othe

[SQL] Order by in Select

2000-07-19 Thread Bernie Huang
Hello, I have a list of id's that I need to sort and fetch. eg; 1,3,6,5,4,3,4,5,6,7,5,4,2 Select id >From table Order By id Asc; it becomes like: 1,2,3,3,4,4,4,5,5,5,6,6,7 What can I add to the above sql statement so that is fetches the specified id first in a sorted list? eg: if $specified_

Re: [SQL] Database authentication and configuration

2000-07-19 Thread Rodger Donaldson
On Tue, Jul 18, 2000 at 12:01:46PM +1000, Carolyn Lu Wong wrote: > Are there anywhere to configure so that whenever I call 'psql dbname', > it'll always prompt for user authentication instead of getting into the > database directly? Take a look at the configuration of your pg_hba.conf file. You

Re: [SQL] Can I create a function that returns many records?

2000-07-19 Thread Tom Lane
"Joel Burton" <[EMAIL PROTECTED]> writes: > Working through the documentation, I see examples using CREATE > FUNCTION METAPHONE(text) RETURNS setof tblPerson AS 'SELECT > * FROM tblPerson' LANGUAGE 'sql', but this returns only a single > numeric value (that doesn't seem to correspond to anythi

[SQL] Can I create a function that returns many records?

2000-07-19 Thread Joel Burton
I'd like to create a function that outs the results of a select query. It might work like this: SELECT METAPHONE('jennifer foobar'); persid | name - 1 | jennifer fubar 10 | gennifer foobar [I already have the metaphone comparing working, it's the returning