473,499 Members | 1,525 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

SQL99 IGNORE

I notice that postgres does not support IGNORE.

I am currently migrating an app from a MySQL datastore to Postgres, and I
would really like to use IGNORE.

I am curious if there is a recommended work-araound.

Thanks,
-Jackson

---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to ma*******@postgresql.org

Nov 22 '05 #1
4 2037
On Fri, 13 Feb 2004, Jackson Miller wrote:
I notice that postgres does not support IGNORE.

I am currently migrating an app from a MySQL datastore to Postgres, and I
would really like to use IGNORE.

I am curious if there is a recommended work-araound.


What does it do? All I find in SQL99 Part 2 related to the word is that
it's reserved.

---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to ma*******@postgresql.org)

Nov 22 '05 #2
Stephan Szabo wrote:
On Fri, 13 Feb 2004, Jackson Miller wrote:
I notice that postgres does not support IGNORE.

What does it do? All I find in SQL99 Part 2 related to the word is that
it's reserved.


AFAICS it isn't listed at all in SQL2003...

Joe

---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend

Nov 22 '05 #3
> > I notice that postgres does not support IGNORE.

I am currently migrating an app from a MySQL datastore to Postgres, and I
would really like to use IGNORE.

I am curious if there is a recommended work-araound.


What does it do? All I find in SQL99 Part 2 related to the word is that
it's reserved.


If you insert from one table into another via a subselect, there's the
possibility that you may violate a unique contraint, simply because many
rows are being inserted at once.

The IGNORE keyword tells MySQL to simply ignore the duplicates if they
exist, not throw an error, and continue inserting the distinct, new
records.

Of course, there are much more logical ways of avoiding that problem,
like simply using a NOT IN on the subquery, or a NOT EXISTS, or maybe
even rethink the schema.

So, it surprises me that IGNORE is part of the spec, if it is. I don't
think I've ever run into a problem where something like this would fit.

Regards,
Jeff


---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

Nov 22 '05 #4
Jeff Davis <jd**********@empires.org> writes:
So, it surprises me that IGNORE is part of the spec, if it is.


It is not. It's listed as a keyword reserved for future use, but no
syntax or semantics are assigned to it. (While the SQL99 authors may
have had some specific future plan in mind, I see no particular reason
to assume that whatever they might've had in mind matches what MySQL is
doing with the keyword...)

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faqs/FAQ.html

Nov 22 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1440
by: Thomas Müller | last post by:
Hello! Running my uploadscript on old server, php4.1.2 ignore aborted fileuploads. Now, the same script on new server doesn't ignore broken uploads. If anybody make a upload and abort this the...
0
1097
by: Maurice LING | last post by:
Hi, I'm wondering if there are any database engines in Jython that is designed to meet all the language syntax and data types of ANSI SQL99, no more, no less. The closest I can find so far is...
6
1714
by: Rob Meade | last post by:
Lo all, I was just running through some code I was writing for a site and when it came to the 'exact phrase' search type I wasn't sure whether that should run through and ignore the words in the...
5
7835
by: Luis | last post by:
Please help, this is due at 11:59 PM tonite. Thanks Write a program that reads a person's name from the keyboard in the format First Middle Last. It should then (1) print each of the names on...
1
34491
by: Thomas Bartkus | last post by:
The meaning of REPLACE INTO is clear to me. IF the new record presents new key values, then it is inserted as a new record. IF the new record has key values that match a pre-existing record, then...
5
3483
by: seapearl1023 | last post by:
Hi, My question is if MS SQL Server 2000 Standard version is SQL99 Compliant? How about MS SQL Server 2000 Enterprise version, MS SQL Server 6.5/7.0? Thanks. Hai-Chu
23
4067
by: FrancisC | last post by:
#include <stdio.h> int file_copy( char *oldname, char *newname ); int main() { char source, destination; printf("\nEnter source file: ");
1
1970
by: alw0015 | last post by:
I'm working on a piece of code that reads in a time from the user. This time value consists of 3 separate inputs: 1 integer representing hours 1 char representing the ":" 1 integer...
6
2716
by: sandy | last post by:
I seem to ALWAYS need to use cin.ignore in my programs (console apps using Dev C++ for a University course). The problem is that if I don't ignore ENOUGH characters then it's like not having the...
0
7130
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7007
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7171
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7386
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
4918
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4599
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3090
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1427
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
664
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.