f

Hi,

I was trying to overload concat operator ||(text,text) such a way that
it behaves like Oracle. i.e. I want 'abc' || null to return 'abc'
I know that it is not the expected  behaviour in postgres, but since I
am migrating the database from oracle to postgres , I need this
behaviour.

But when I try to drop the existing || operator, I get the following
error
ERROR:  cannot drop operator ||(text,text) because it is required by
the database system

Also I cannot modify the application which runs over the database.
Hence I cannot overload || (varchar,varchar) and use it.

Is there any way of overloading the || operator , such that it behaves
like Oracle? ( I know that Oracle behaviour is wrong , but my aim is
to move an existing application which runs on Oracle to Postgres :-(
)

Thanks,
Abhiman

 0
trisuresh
9/3/2004 1:49:47 PM
comp.postgresql.general 5128 articles. 0 followers.

1 Replies
1091 Views

Similar Articles

[PageSpeed] 48

Suresh Tri wrote:
>
> But when I try to drop the existing || operator, I get the following
> error
> ERROR:  cannot drop operator ||(text,text) because it is required by
> the database system
>
> Also I cannot modify the application which runs over the database.
> Hence I cannot overload || (varchar,varchar) and use it.
>
> Is there any way of overloading the || operator , such that it behaves
> like Oracle? ( I know that Oracle behaviour is wrong , but my aim is
> to move an existing application which runs on Oracle to Postgres :-(
> )

Your best bet might be to define your own type "oraclevarchar" with stub
implementations of most functions/operators except those you want to
oracle-ise.

--
Richard Huxton
Archonet Ltd

TIP 9: the planner will ignore your desire to choose an index scan if your
joining column's datatypes do not match


 0
dev
9/6/2004 2:16:48 PM

Similar Artilces:

text + text
What is "text + text" supposed to do right now? It doesn't seem very useful to me. What about making "text + text" as an equivalent for "text || text"? Most strongly-typed programming languages do this. And MS SQL Server too, I think (CMIIW). -- dave ---------------------------(end of broadcast)--------------------------- TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org Am Freitag, 8. Oktober 2004 12:57 schrieb David Garamond: > What is "text + text" supposed to do right now? Nothing. > What about making "text + text" as an equivalent for "text > || text"? Most strongly-typed programming languages do this. And MS SQL > Server too, I think (CMIIW). What would this gain except for bloat? It's not like SQL is utterly compatible with any programming language; users will still have to learn all the operators anyway. -- Peter Eisentraut http://developer.postgresql.org/~petere/ ---------------------------(end of broadcast)--------------------------- TIP 9: the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match Peter Eisentraut wrote: >>What is "text + text" supposed to do right now? > > Nothing. Then are these bugs? (7.4.5 and 8.0.0beta1 give same results). Frankly, the current behaviour is quite strange to me. ------------------ =...

text-text
Wondering how what I input to my UTF-8 terminal gets passed along through my patched [1] trn ... Cyrillic: А Б В Г Д Е Ж З И Й К Л М Н О П а б в г д е ж з и й к л м н о п IPA: ᴀ ᴁ ᴂ ᴃ ᴄ ᴅ ᴆ ᴇ ᴈ ᴉ ᴊ ᴋ ᴌ ᴍ ᴎ ᴏ ɀ Ɂ ɂ Ƀ Ʉ Ʌ Ɇ ɇ Ɉ ɉ Ɋ ɋ Ɍ ɍ Ɏ ɏ [1] https://groups.google.com/d/msg/comp.sys.raspberry-pi/7Z37Hdrm0DM/6aqD-reXFzAJ ...

Text from required text box to read-only text box
Hello, I am fairly new to JavaScript and its use in Acrobat Professional. My situation is this: I have a form with a text box field which is required for the user to enter his/her name. I would like the required text box to display the name in all caps. I also need the user's name to appear in a read-only text box later in the form, which I would like to have the first letter of the user's first, middle initial, and last names to be capitalized. I would also like to have all required fields on the form highlighted in yellow, but the highlighting not printed. Lastly, I would like the...

Pages
I have a titel-textfield over a pic (headline) , text is black, background for text transparent. A second textfield should overlapp the first textline..... When i arrange the second field with the same settings like the first, the first text disappear... How can i do, that the second text overpapps the first, all over the pic. Any help appreciated! Thanks for replies! I am german and hope that the engish speaking people understand my problem! Soory! Gerd In article <611db9e2-b085-4fe5-907a-ca714b0c32dd@m74g2000hsh.googlegroups.com>, hurlebaus <gerd.schenk@freenet.de> wrote:...

text 2 text
I'm rather new to ustation and am having trouble finding replacements for all of my Acad lisp routines. One that I'd like to find changes a selected text string to read like the second selected text string. I realize this can all be done in the text editor but it's not all that quick. Does anyone know of a macro or mdl which can handle this task? Thanks in advance.---Calvin I don't know of any application that will do what you describe, but have you looked at Edit > Find/Replace text? You may also find Bentley's discussion groups of assistance. Over there you can meet other users of Bentley products, exchange ideas, and discuss a wide range of technical subjects. These groups are an excellent technical resource for all users of Bentley products and services. Hope to see you there! For more information take a peek at this page: http://selectservices.bentley.com/discussion/index.htm -- Best Regards, Inga Morozoff [Bentley] www.askinga.com "jgonzales24" <jgonzales24@cox.net> wrote in message news:xcLMb.13975$zs4.2376@fed1read01... > I'm rather new to ustation and am having trouble finding replacements for > all of my Acad lisp routines. One that I'd like to find changes a selected > text string to read like the second selected text string. I realize this > can all be done in the text editor but it's not all that quick. Does anyone > know of a macro or mdl whi... Surrounding text with text I was wondering if it was possible to surround a text body with text like so: +--------------+ |ABCDEFGHIJKLM | |H N| |A Main Body O| |L Text goes P| |B here Q| |-=+_ZYXWVUTSR | | | | | | | | | +--------------+ This seems far-fetched, but just curious. I suppose that I could just move stuff around by hand in the GIMP later on, but there's probably a {better,more {extensible,clean}} way of doing it from (La)TeX. -FreeSmith ptjm@interlog.com (Patrick TJ McPhee) wrote in message news:<bffbhe$per$1@news.eusc.inter.net>... > Peter Flynn had an example like that, which he either posted here or > posted a link here. It was something to do with a certificate -- try > searching for his name and that word in google. > > It wouldn't be hard to do with metapost. I have a macro called pathalong' > which puts text along an arbitrary path. Well, it's been a while, but I finally finished it. It's a little job I was doing for an upcoming wedding. At any rate, I used pstricks to make the text go along a path, along with a couple of hacks for sizing (from graphicx) and kerning along the line (from soul). Here's the code (don't laugh): CAUTION:THIS CODE MAY MAKE YOU WRETCH ---SNIP--- \documentclass{article} \usepackage{graphicx} \usepackage{pstricks,pst-text,nopageno} \usepackage[width=8.5in]{geometry} \usepackage{soul} \begin{document} \thispagestyle{empty} \set... standalone operation of ISE text editor or MTI text editor I can not find a way to lauch the ISE text editor or MTI HDL editor in the standalone mode. Does anyone how to do it. I want to view the .v and .vhd file using syntax highlight, but not necessary want to launch the Project Navigator or MTI simulator everytime I double click on one of .v/.vhd file. Thanks Charles ... May I operate on BLT text images the same way as I do with text strings ? A couple of weeks ago I enquired about the possibility to rotate (90, 180, 270, 360 degrees) text strings Since Tcl does not have this buil-in capability, someone suggested using BLT so actually creating graphic text objects. So far I could only try to use BLT on my laptop, as a stand-alone library. I'll have some time in the next few weeks, in-between big simulations, to try the integration of BLT with the old Tcl version we are still using.... updating is in my ToDo list. I'd like to make sure that once we replace the text strings with graphic text objects (my understanding is that these are like small bit-maps) we will still be able to: - move the text objects around on the canvas by pointing and clicking on the object and dragging the mouse while keeping the rightmost button pressed. - delete the single text object by pointing and clicking on the object while holding down the <Ctrl> key and the mouse rightmost button. Thank you in advance for your help, Maura maura.monville@gmail.com wrote: > A couple of weeks ago I enquired about the possibility to rotate (90, > 180, 270, 360 degrees) text strings > Since Tcl does not have this buil-in capability, someone suggested > using BLT so actually creating graphic text objects. So far I could > only try to use BLT on my laptop, as a stand-alone library. > I'll have some time in the next few weeks, in-between big simulations, > to try the integration of BLT with the old Tcl version ... Unbound text box, text>255, MS Access/PostgreSQL Hello. I have the following problem with MS Access/PostgreSQL combination: There is a form in Access that has an unbound text box, used for entering a commentary of a batch of records. There is a DAO Append Query that has a parameter that is passed from the text box using parameter of DAO QueryDef object. I adjusted B7 parameter (Text as LongVarchar) in connection string (ODBC driver) to 1, so that Access links PostgreSQL Text fields as Memo fields in Access. The intention was to be able to enter unlimited length commentary into the field. But, although I can enter unlimited text by using... matrix and text to a text file Hi, I know some similar question have been solved before but I have been reading for a while and I didn't find the answer of my question so, I ask you. I want to create a text-file (.txt) where I will have some text and some matrixs. The format that i want is something like that: -Title- Name1. Name2. power(dbm): big matrix (12000X400) aprox frequency(hz) vector(1x12) aprox So, i created a m-file that can do this writing with fprintf every single character on the file using lots of for loops. It works good but if the matrix is that size it could take a time (about 7 min... Text filtering in a text field Hi, am new to SKILL and would like to do some text checking and filtering for illegal characters in the text field. Meaning I have a text field in my form that is only to be with text, not any of the symbols (i.e. ~!@#$%^&* and so on). When the user input and saved the fields, those characters won't be allowed to be saved. What will be the best way to filter out only text? Only numbers? Terence <terrylau77@gmail.com> writes: > Hi, am new to SKILL and would like to do some text checking and > filtering for illegal characters in the text field. Meaning I have a > text f...

aligning text and image-text
I use a program to make Email addresses harder for spammers to harvest. It converts them to slightly blurred images using http://mindprod.com/products1.html#MASKER When I embed them in text, I have figured out how to get them to align naturally with the surrounding text, but the browser inserts extra inter-line spacing above the line containing the image. You can see the effect at http://mindprod.com/book/books.html at the bottom of the page where it says: "Please email your feedback for publication, letters to the editor, errors, omissions, typos, formatting errors, ambig...

Flowing text around text
Hi all, Could please someone tell me how to get text flowing around a framed piece of text with colored background? Something like: text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text ----------------------------------------------- text text text text | Some piece of information goes here | text text text text | | text text text text | Some piece of information goes here | text text text text | | text text text text | Some piece of information goes here | text text text text | | text text text text | Some piece of information goes here | text text text text | | text text text text ----------------------------------------------- text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text except that I am unable to represent colored background in ASCII. :-) Of course, I can always turn the piece of text into a picture and then use some package such as wrapfig to...

HTML Text and Photoshop Text
Hey Folks: I thought it best to do title text in photoshop and bring into my webpage for a better quality look. But, using Composer, the HTML looks pretty darn OK. Thoughts? Composer? what is that.. I would much prefer using Adobe Photoshp for text titles. Their effects are nice & customizable & with CS2, you can do more with that. "Raoul" <gaycat56@gmail.com> wrote in message news:1132628078.236760.142570@g44g2000cwa.googlegroups.com... > Hey Folks: > > I thought it best to do title text in photoshop and bring into my > webpage for a better quali...

Highlighy text in Text Box
Using an InputBox, there is the option to *suggest* text (Default). It appears highlighted and can be accepted or replaced by the user. I am attempting to create my own input form which has one Text Box, one command button (cmdAccept ) and a simple label to tell the user to make an entry. What I cannot do is to mimic that suggested default input string. Can someone show me how to do it? The following code is from a test program with two forms. '#### this is on FrmMain Private Sub Option1_Click() ' Other Event selected - 14 character maximum With FrmBGOther ...

text in a widget, text-widget
hello i have an application with a couple of text widgets but i would like to add some functionalities that at first and second sight are not directly supported by the plain text widget itself - ? for example i would like certain lines of text within the textwidget to take different background colors according to certain parameters also i would like to be able to detect certain sentences or words that would become 'links' and by clicking them i would open up different windows any suggestions to solutions and widgets for the above problems ? - i probably could...

text field only for text
Hi I would like some help about the following : I have a text field and I don't want it contains any numbers. How can I limit this situation ? So far, I couldn't find literature exacly about this here in the newsgroup. TIA Paulo "Paulo Rodrigues" <amigo.alf@netvisao.pt> wrote in message news:<newscache$kgmtmh$bb1\$1@newsfront4.netvisao.pt>... > Hi > > I would like some help about the following : > > I have a text field and I don't want it contains any numbers. How can I > limit > this situation ? > > So far, I couldn't find literature exacly about this here in the newsgroup. > > TIA > Paulo Paulo, the online help is your FRIEND. Private Sub Text0_KeyPress(KeyAscii As Integer) If KeyAscii >= 48 And KeyAscii <= 57 Then KeyAscii = 0 End If End Sub Just put this code in the KeyPress event of whatever text field you do not want to contain numbers. OR you could glue thumbtacks to the number keys on all your users keyboards... Thought I'd add my 2 cents worth. Avoid magic numbers, especially when you can use builtin VBA constants. The following is a little more intuitive to read and a future developer does not have to lookup 48 and 57 to see exactly what is being blocked. Private Sub Text2_KeyPress(KeyAscii As Integer) 'Cancel any numeric keys If KeyAscii >= vbKey0 And KeyAscii <= vbKey9 Then KeyAscii = 0 End If End Sub The above solu...

highlight text in text widget
Hi, I am trying to make widget that displays text. I also want a search keywords available. The way I have envisioned is something similar to emacs search, i.e. it highlights all the occurrences of the keyword that you are interested in. I am trying to find out if that kind of highlighting be done in widget_text or some other widgets. Can anyone help? Thanks neon writes: > I am trying to make widget that displays text. I also want a search > keywords available. The way I have envisioned is something similar to > emacs search, i.e. it highlights all the occurrences of the keyword &g...

Text recognition and Text to speech
I'm working on a project for Blind assistance using OCR and TTS . if you can help with the CODES needed for both phases of text recognition and text to speech conversion ...

rich text in text field
I am using GUIDE for my UI work. (MATLAB 2009b) I would like to display some rich-text (font size change, bold, underline etc) inside a panel. Can I put some rich-text, using html tags, in a text field? For example: <html><b> this is bold </b></html> I know you can do it in table headers. Thank you. ...

Text IN an Image To Straight Text?
Hi. (I'm not sure where to ask this so I'm trying a few newsgroups) I have some .jpg's of text documents. Is there a utility which will work like OCR in a scanner, helping to convert the text WITHIN the image to straight text? I don't have a printer working at the moment, or I'd print the .jpg's and then scan them using OCR. (The format doesn't necessarily have to be .jpg) Thanks in advance for any help GP Yes, if the image is not to bad a pic (not much noise and all that). Try http://www.twocows.com/windows.html I know they have a couple of ocr programs s...

text
Hello, I have installed oracle xe 10g on linux debian. I'm trying to scan a word files using context index, it is my code: CREATE INDEX file_index ON files(path) INDEXTYPE IS ctxsys.context PARAMETERS ('datastore ctxsys.file_datastore format column ot_format'); Path is a real path to word file on disk. But indexing process isn't finishing success, because when I execute: select * from ctx_user_index_errors I see a lot of error's DRG-11207 and information that documents was not indexing. I have read that it's a bug oracle 9 database, additional I have found instruction how to resolve this problem. There was path also, which I have installed. It's doesn't help me. Could you help me? Sorry for my English, I'm still learning. Best regard sw sw wrote: > Hello, > > I have installed oracle xe 10g on linux debian. I'm trying to scan a word > files using context index, it is my code: > > CREATE INDEX file_index ON files(path) INDEXTYPE IS ctxsys.context > PARAMETERS > > ('datastore ctxsys.file_datastore format column ot_format'); > > Path is a real path to word file on disk. But indexing process isn't > finishing success, because when I execute: > > select * > > from ctx_user_index_errors > > I see a lot of error's DRG-11207 and information that documents was not > indexing. > > I have read that it's a bug oracle 9 database, additional I...

text
I've got points in space were I want a tag and a mean value attached to every point. They are both strings! I have renamed them tag1 and tag2. Only one string at a time can be shown (tag or mean value). What is 'Position', 'PropertyName' and 'PropertyValue' in the code below ??? Possible usefull code text('Position',[x,y,z],'String','string') or text(x,y,z,'string','PropertyName',PropertyValue....) My code so far: % codepiece for tag2 % text(x-position, y-position, z-position, string) text(abData.pt.t...

redirect text to file; text widget
I've loaded text from a file into the text widget, and having edited it would like to redirect it back into a file, but haven't found a handle for it. If there was an attribute such as the "-textvariable" option for the entry and label widgets, I could echo it into a file from another widget (button, etc). Thanks ..t get 0 end "John Peters" <john@jpeters.net> wrote in message news:20060701143102.70526542.john@jpeters.net... > > I've loaded text from a file into the text widget, and having edited it > would like to redirect it back into a file, but haven't found a handle for > it. If there was an attribute such as the "-textvariable" option for the > entry and label widgets, I could echo it into a file from another widget > (button, etc). Thanks Usman, Your solution is incorrect. The first character in a text index is 1.0, not 0. Usman Muzaffar wrote: > .t get 0 end > > "John Peters" <john@jpeters.net> wrote in message > news:20060701143102.70526542.john@jpeters.net... > >>I've loaded text from a file into the text widget, and having edited it >>would like to redirect it back into a file, but haven't found a handle for >>it. If there was an attribute such as the "-textvariable" option for the >>entry and label widgets, I could echo it into a file from another widget >>(button, etc). Thanks > > >...

Function overloading or method overloading is a feature found in various programming languages such as Ada , C++ , C# , D , and Java , that allows ...

JULIA Gillard has missed the opportunity to take advantage of Labor's latest crisis.

China mulls criminalizing speeding, overloading China Daily Partners : - qstheory.cn - PeopleDaily - Xinhua.net - China.org.cn - cntv.com - ...

Chief of S.Korean sunken ferry operator arrested for overloading People's Daily Online After acquiring the vessel, the Chonghaejin Marine had ...

Twitch Plays Pokémon fights a Haunter. Kind of. We're a little over a week into the phenomenon that is Twitch Plays Pokémon (TPP), and the "social ...