Re: [SQL] Compilation Error AIX

2007-02-01 Thread Andrew Sullivan
On Thu, Feb 01, 2007 at 09:33:59AM -0600, Hiltibidal, Robert wrote: > > I am getting this error You really need to take questions about compiling to the -general list. I've put a Reply-To to that list, and have moved this discussion there. Also, it's really not a good idea to send emails to ind

[SQL] Insert Data and autonumeric field

2007-02-01 Thread André José Guergolet
Hi everybody, I need to insert a row in a table and get the Id of this row ( My primary key ). Example: INSERT INTO table1 (date, field2, field3) VALUES (now,'value2','value3'); SELECT last_value FROM seq_table1; I'm running each command

Re: [SQL] Insert Data and autonumeric field

2007-02-01 Thread Andrew Sullivan
On Thu, Feb 01, 2007 at 04:09:22PM -0300, André José Guergolet wrote: > PROBLEM: Many clients are getting duplicated IDs. > > What is the best way of doing this? Use a sequence. You can get the current value of the sequence with SELECT currval('seqname'). No, there's not a race condition; see t

Re: [SQL] Insert Data and autonumeric field

2007-02-01 Thread Tom Lane
=?iso-8859-1?Q?Andr=E9_Jos=E9_Guergolet?= <[EMAIL PROTECTED]> writes: > INSERT INTO table1 (date, field2, field3) VALUES > (now,'value2','value3'); > SELECT last_value FROM seq_table1; You should never ever look directly at the sequence table (except perhaps for manual

Re: [SQL] Differentiate Between Zero-Length String and NULLColumn Values

2007-02-01 Thread Andrew Sullivan
On Wed, Jan 31, 2007 at 12:18:03PM -0800, BillR wrote: > Peter Eisentraut wrote: > >It doesn't violate any spec and it's certainly allowed by PostgreSQL > >without any flags. It's just that the result is not what some people > >expect. > "= NULL" violates the SQL-92 Specification. I don't w

Re: [SQL] Index Anding

2007-02-01 Thread Chris Browne
[EMAIL PROTECTED] (Andrew Sullivan) writes: >> Does postgres provide 64 bit support? If so is there a precompiled 64 >> bit version for AIX? I have the 32 bit GCC and can compile 32 bit. 64 >> bit GCC I have not gotten stabilized. (I cold use a tip in that >> direction if anyone lese has experience