[SQL] Unexpected SQL error for UPDATE

2006-07-11 Thread aurora
Originally I have a table like thiscreate table users ( userid integer not null,

[SQL] Invalid memory alloc request size

2006-07-11 Thread Daniel Caune
Hi, I'm using PostgreSQL 8.1.4 on a Linux 2.6.8-2-686-smp machine, 2 Go memory. I have a strange error "invalid memory alloc request size", when I perform the following query: => select * from player where lower(username) = 'wario'; ERROR: invalid memory alloc request size 1918988375 where pla

Re: [SQL] How to find entries missing in 2nd table?

2006-07-11 Thread Richard Broersma Jr
--- Richard Broersma Jr <[EMAIL PROTECTED]> wrote: > > >> I need to get all entries from the table control that are not listed in > > >> datapack. > > > > > > SELECT C.CONTROLLER_ID > > > > > > FROM CONTROL AS C > > > LEFT JOIN DATAPACK AS D ON ( C.CONTROLLER_ID = D.CONTROLLER_ID) > > > >

Re: [SQL] How to find entries missing in 2nd table?

2006-07-11 Thread Frank Bax
At 10:19 AM 7/11/06, [EMAIL PROTECTED] wrote: control: controller_id pk; datapack: controller_id fk; I need to get all entries from the table control that are not listed in datapack. select controller.controller_id from controller left join datapack on contr

Re: [SQL] Can function results be used in WHERE?

2006-07-11 Thread Bryce Nesbitt
Tom Lane wrote: > But as far as the underlying misconception goes, you seem to think that > "4" in the WHERE clause might somehow be taken as referring to the > fourth SELECT result column (why you don't think that the "1" would > likewise refer to the first result column isn't clear). This is not

Re: [SQL] How to find entries missing in 2nd table?

2006-07-11 Thread Milen A. Radev
Richard Broersma Jr написа: >> Hi, >> I realize I probably lost my marbles but I've been having a god >> awful time with a single query: >> >> control: >> >> >> controller_id pk; >> >> >> datapack: >> >> controller_id fk; >> >> >>

Re: [SQL] How to find entries missing in 2nd table?

2006-07-11 Thread Scott Marlowe
On Tue, 2006-07-11 at 09:19, [EMAIL PROTECTED] wrote: > Hi, > I realize I probably lost my marbles but I've been having a god > awful time with a single query: > > control: > > > controller_id pk; > > > datapack: > > controller_id fk; > >

Re: [SQL] How to find entries missing in 2nd table?

2006-07-11 Thread Richard Broersma Jr
> Hi, > I realize I probably lost my marbles but I've been having a god > awful time with a single query: > > control: > > > controller_id pk; > > > datapack: > > controller_id fk; > > > > > I need to get all entries

[SQL] How to find entries missing in 2nd table?

2006-07-11 Thread alex-lists-pgsql
Hi, I realize I probably lost my marbles but I've been having a god awful time with a single query: control: controller_id pk; datapack: controller_id fk; I need to get all entries from the table contr

Re: [SQL] MS-SQL<->Postgres sync

2006-07-11 Thread Andrew Sullivan
On Mon, Jul 10, 2006 at 01:30:51PM -0500, Scott Marlowe wrote: > > (which means you have to deal with failures in one database and not > > another). Is the idea that this is multi-master? > > I wonder if it would be possible to write a set of triggers for MSSQL > that would allow you to run slony

Re: [SQL] ON INSERT view rule

2006-07-11 Thread Anthony Chavez
Anthony Chavez <[EMAIL PROTECTED]> writes: > What I've got here are a couple of ON INSERT rules for a view. The > second rule is what I'm concerned about. I wrote it with PostgreSQL's > ACID compliance in mind, but can I trust it? Oops, forgot to mention two things: 1. The addresses_address_li

Re: [SQL] above the date functionssssssss

2006-07-11 Thread Michael Fuhr
On Tue, Jul 11, 2006 at 05:04:06PM +0530, Penchalaiah P. wrote: > i want to get month and year in the current date.. > see this is date 2005-02-12... here date is 12 , month is 02 and year is > 2005.. > but i want format like 02-2005... See "Data Type Formatting Functions" and "Date/Time Functions

Re: [SQL] above the date functionssssssss

2006-07-11 Thread Stuart
Penchal reddy, You should be able to use extract or date_trunc functions like in the documentation: example: SELECT EXTRACT(MONTH FROM DATE '2005-02-12') | "-" | EXTRACT(YEAR FROM DATE '2005-02-12'); or SELECT date_trunc('month', DATE '2005-02-12') | "-" | date_trunc('year', DATE '2005-02-

Re: [SQL] above the date functionssssssss

2006-07-11 Thread A. Kretschmer
am 11.07.2006, um 17:04:06 +0530 mailte Penchalaiah P. folgendes: > > Hi good evening to every one. > > i want to get month and year in the current date.. > see this is date 2005-02-12... here date is 12 , month is 02 and year is > 2005.. > but i want format like 02-2005... Simple, to_c

[SQL] above the date functionssssssss

2006-07-11 Thread Penchalaiah P.
Hi good evening to every one……… i want to get month and year in the current date..see this is date 2005-02-12... here date is 12 , month is 02 and year is 2005..but i want format like 02-2005... can u tell me how to do this   Thanks  &  Regards Penchal reddy | Software Engineer   

[SQL] ON INSERT view rule

2006-07-11 Thread Anthony Chavez
Hello, pgsql-sql! What I've got here are a couple of ON INSERT rules for a view. The second rule is what I'm concerned about. I wrote it with PostgreSQL's ACID compliance in mind, but can I trust it? From what I gather, if I were to simply use NEW.address_line_id rather than address_lines_id_se