REBOL3 - PgSQL (PostgreSQL and REBOL [web-public])

Return to Index Page
Most recent messages (300 max) are listed first.

#UserMessageDate
68xavier.5-Dec-07 13:10
67MaartenIf you have Command or the SDK write a wrapper using C Callbacks (google for that + rebol) and the /Library component4-Dec-07 5:45
66xavierok i have the dll and i wonder what to do now .... if anyone can give me informations ....3-Dec-07 23:24
65BrianHEven the command line tools connect through oledb or odbc.3-Dec-07 13:04
64Pekrmy friend uses MSSQL with its command line tool ....3-Dec-07 6:59
63BrianHBy the way, ODBC and OLEDB are the native access methods of MS SQL Server - they are not an add-on layer. The tcp line protocol is the same protocol that the client libraries use. I think there is a few open source libraries that support the tcp connections (such as FreeTDS), though they may not be very current. You might be able to look at their code and docs to figure out the protocol.3-Dec-07 0:23
62BrianHThat is the native client. Tell us if you have any luck with it.2-Dec-07 23:18
61BrianHhttp://www.microsoft.com/downloads/details.aspx?FamilyId=DF0BA5AA-B4BD-4705-AA0A-B477BA72A9CB&DisplayLang=en#SNAC2-Dec-07 23:17
60xaviercan u tell me where is it ?2-Dec-07 21:27
59BrianHThere is a native non-odbc client library for ms sql that is fast. There is also a TCP line protocol to access it.29-Nov-07 5:33
58sqlabdo you mean MS sql server? Galt Barber wrote an SQL -Proxy for MS-SQL7 a few years ago. Modifying his script I was able to snoop the connections to the Cach DB too.28-Nov-07 22:54
57BrockI've always wondered the same thing. Same with creating ports of other language functions or custome controls (widgets) etc.28-Nov-07 22:21
56xavieryes, what a pity. i wonder how you can write a driver for a database .... i d like to try to do it just for fun28-Nov-07 20:01
55GrahamI think sql server is only odbc27-Nov-07 21:32
54xavieri have experienced a sort of problem : i needed a native driver for sql server in rebol because odbc wasnt suitable. Does this exist or its not possible ?27-Nov-07 20:00
53GrahamSo, my preference is for postgresql if I can.21-Nov-07 22:51
52GrahamI'm just not sure that Mysql's license will eventually catch doc's work as well.21-Nov-07 22:51
51WillGraham, Dock's Mysql driver run on eavy tasks without a hitch 8)21-Nov-07 17:45
50GrahamI will have multiple clients accessing the database .. webserver, update utiliities and main engine21-Nov-07 17:42
49GrahamOh ... my bad.21-Nov-07 17:39
48PekrAs for PostGress, IIRC the driver was in better state than the one of mySQL? It even used continual parsing. Doc said later on even mySQL driver will be rewritten that way, and maybe it already is, dunno.21-Nov-07 7:45
47PekrThere is one defficiency with SQLite - it is one user solution. Well, you can lock iirc, on file level (yes, even records), but SQL requests are not serialised, so you have to think twice, when more than one client would connect to database.21-Nov-07 7:44
46PekrSQLite is not memory based imo. It was RebDB. SQLite is the coolest thing on earth for the purpose it is supposed to serve :-) I mean - small, embeddable SQL engine. MySQLLib is not good solution imo, as it does not use SQL syntax and is not even free for embedded stuff.21-Nov-07 7:44
45GrahamGot databases over 2Gb in size21-Nov-07 3:44
44GrahamNot SQLite ... as I need something that is not memory based.21-Nov-07 3:44
43AshleyOr SQLite?21-Nov-07 2:53
42GrahamWhat's the current status of the postgresql driver ? Should one use mysql instead?21-Nov-07 0:18
41DockimbelNo problem, I'm usually much more productive under pressure ;-)29-May-07 18:40
40DaveCOk thanks. I'll double check the exact number tommorrow, but it's the 8.1 series. LIMIT would be a good idea, but the query returns only one row. It's the amount of data in the one column that is the problem. (Whole HTML reports in one chunk). I was thinking that I should split up the report into a set of smaller chunks as it gets generated anyway.

I'll give you some more info tommorrow. I appreciate you are busy with Cheyenne, so thanks for your time.

29-May-07 18:27
39DockimbelIf this don't work, tell me what Postgres server version are you using, I'll try to reproduce the error.29-May-07 17:29
38DockimbelThey might be several reasons why this don't work. Try using LIMIT as a cheap workaround : http://pgsqld.active-venture.com/queries-limit.html29-May-07 17:27
37DaveCI've been using pgsql-protocol (r090) to store HTML reports into the DB.

It can write a large compressed string into a text column ok. Trying to read the data back causes the program to hang. The length of the stored string returns 182514 chars. (In psql: SELECT length(html) FROM reports....)

Test Code; sql: {SELECT html FROM reports.html_reports WHERE ticket = '2007-756-fcw'} insert db-port sql html: first db-port .... rest of test program never gets executed.

Does anyone know if this a known behaviour? Thanks For information, if I select any other column, the program runs as expected. The data is these columns is a lot smaller in length.

29-May-07 17:05
36Gabrielejaneks: unfortunately the pdf format does not support unicode, so that's not trivial to do... i will do it, eventually.3-Mar-07 9:55
35Oldeshere are charset ids you can load into my scripts: print read http://box.lebeda.ws/~hmm/rebol/projects/ucs2/latest/charmaps.rb2-Mar-07 15:38
34JaneksIt seems for me too the best aproach too. One another case where to use encoding funcions could be PDF maker - I had trouble to get pdf output into special characters of my language.2-Mar-07 15:36
33Oldesif you set the encoding on the server side, you don't need to convert your strings in Rebol but let the server to do that job2-Mar-07 15:20
32Oldeshttp://www.postgresql.org/docs/7.4/static/multibyte.html2-Mar-07 15:19
31Oldesin MySQL I for example use: "SET character_set_client = cp1250"2-Mar-07 15:18
30Oldesthis should the best way (I just don't remember the correct command)2-Mar-07 15:15
29Oldesor let the sql server know, what encoding you are using (that it's not UTF8)2-Mar-07 15:14
28Oldesbut first load correct charset, for example: ucs2/load-rules "ISO-8859-1"2-Mar-07 15:12
27Oldesdo http://box.lebeda.ws/~hmm/rebol/ucs2_latest.r do http://box.lebeda.ws/~hmm/rebol/utf-8_latest.r utf-8/encode-2 ucs2/encode "abc"2-Mar-07 15:10
26Oldesyou can use my script to encode unicode chars, search for links in unicode channel2-Mar-07 15:06
25JaneksThanks Oldes - it worked! The minor thing now is that I can not use UTF8 encoding for databases then I am getting in case of language specific characters:

>> insert db {INSERT INTO my_first_table VALUES (1, 'kani', 12.34);} ** User Error: ERROR: invalid byte sequence for encoding "UTF8": 0xede76e ** Near: insert db {INSERT INTO my_first_table VALUES (1, 'kani', 12.34);} >>

But well - it seems that I can still use Win1257 encoding or try to set client encoding - that I did not yet tried/learn.

2-Mar-07 15:03
24Oldespl/matched-rows: either error? try [pos: to integer! trim pos][0][pos]2-Mar-07 14:52
23Oldesbut as you see. try the change I mentioned before: pl/matched-rows: either not error? try [pos: to integer! trim pos][pos][0]2-Mar-07 14:51
22OldesI don't know, I don't have/use psql for quite long time2-Mar-07 14:50
21JaneksI have PostSQL 8.2 It seems that I can connect and send SQL commands and they are executed, but whenever in the SQL script/string appears word TABLE I am getting error: >> insert db {CREATE TABLE my_table ( { prod_no integer, name text, price numeric);} ** Script Error: Invalid argument: TABLE ** Where: forever ** Near: to integer! trim pos

Any workaround? Thanks!

2-Mar-07 14:13
20GrahamOldes ... do you have a download somewhere of your patched async version?19-Jan-07 19:28
19GrahamAre there any gotchas with the postgresql driver ?19-Jan-07 19:27
18Thr.1-Apr-06 18:19
17GrahamCan connect okay on localhost, but not from another pc on the lan .. guess it's due to some configuration setting.1-Sep-05 9:18
16Grahamjust installed postgesql 8 on windows 2003, but can't seem to create tables. Get syntax errors reported.1-Sep-05 9:18
15GrahamHmm. To unpack Nenad's archive, you have to rename it to pgsql-r090.rip from pgsql-r090-1.rip30-Aug-05 6:45
14IngoSomething else that works:

insert db "set client_encoding to 'win'"

now pgsql understands what rebol sends it, doesn't work for "", though.

25-Jul-05 12:26
13IngoThanks Oldes!25-Jul-05 12:24
12OldesIm' using the non async version with these changes with no problems and use UNICODE encoding as well24-Jul-05 13:35
11Oldesto: pl/matched-rows: either not error? try [pos: to integer! trim pos][pos][0]24-Jul-05 13:34
10Oldesfrom: pl/matched-rows: either pos [to integer! trim pos][0]24-Jul-05 13:34
9Oldesand you can also change line 276:24-Jul-05 13:34
8Oldesin function to-octal replace "\\" with "\"24-Jul-05 13:32
7Oldesyes, there is a bug in nenads code24-Jul-05 13:29
6IngoA question about nenads original pgsql (0.90),

I have a database using UNICODE as the encoding, and try to connect via pgsql. Characters get encoded as, e.g. \010 ( #"^/" ) etc. I tried to change the client encoding within postgresql to winxxxx, or latinxxx, but it made no difference.

any ideas?

19-Jul-05 14:45
5OldesAt this moment I'm testing it for logging messages into DB form this experimental chat I'm working on: http://box.lebeda.ws/~hmm/ and it was running without problems, the chat is working and data stared. I will make more tests after I finish some app. design things.22-Jun-05 17:20
4GrahamHow well does it work?21-Jun-05 19:56
3OldesJust wanted to say, that I needed async postge SQL protocol, so I used the Nenad's non-async version located here: http://rebol.softinnov.org/pgsql/ and made async my own version, which is available here: http://box.lebeda.ws/~hmm/rebol/a-pgsql.r21-Jun-05 17:23
2Pekr? :-)17-Jun-05 7:39
1Oldessafra16-Jun-05 22:09

Return to Index Page