Re: [fpc-pascal] Re: Connecting to Firebird using FPC/Lazarus over a LAN with user creation privilege

2013-03-10 Thread Reinier Olislagers
On 10-3-2013 21:56, Mark Morgan Lloyd wrote: > Reinier Olislagers wrote: >> I've written a demo application that: >> uses regular TIBConnection and SQL commands to >> 1. create a new db on a server >> 2. create a user with GRANT ADMIN ROLE and full control over the new db > > Subject to a maximum

Re: [fpc-pascal] Re: Connecting to Firebird using FPC/Lazarus over a LAN with user creation privilege

2013-03-10 Thread Mark Morgan Lloyd
Reinier Olislagers wrote: I've written a demo application that: uses regular TIBConnection and SQL commands to 1. create a new db on a server 2. create a user with GRANT ADMIN ROLE and full control over the new db Source: https://bitbucket.org/reiniero/fpc_laz_patch_playground/downloads/firebird

Re: [fpc-pascal] Sigsegv with refcounting interface

2013-03-10 Thread Joao Morais
Sorry about breaking the thread. On Sun, Mar 10, 2013 at 3:47 PM, Joao Morais wrote: > Anyway I'd like to see some fixes in the rtl, not because of > compatibility but because of performance improvement: not declaring > refcounted parameters such as ansi strings and com interfaces will > lead to

Re: [fpc-pascal] Exe file names (was:differences between .pp and .pas files)

2013-03-10 Thread Joao Morais
On Sun, Mar 10, 2013 at 2:49 AM, 印場 乃亜 wrote: > > On 2013/02/26, at 8:51, Joao Morais wrote: > >> On Mon, Feb 25, 2013 at 8:03 PM, Graeme Geldenhuys >> wrote: >>> >>> I quite like this idea. I have always hated *nix systems that don't use >>> extensions for executables. Rather hard to quickly se

Re: [fpc-pascal] Sigsegv with refcounting interface

2013-03-10 Thread Joao Morais
On Sat, Mar 9, 2013 at 8:33 AM, Jonas Maebe wrote: > > On 09 Mar 2013, at 02:37, Joao Morais wrote: >> >> On Fri, Mar 8, 2013 at 4:09 PM, Flávio Etrusco >> wrote: >>> >>> [...] >>> >> >> You are suggesting that this unlikely coincidente which causes a >> sigsegv should be the programmer's respons

Re: [fpc-pascal] Re: Connecting to Firebird using FPC/Lazarus over a LAN with user creation privilege

2013-03-10 Thread Mark Morgan Lloyd
Reinier Olislagers wrote: I've written a demo application that: uses regular TIBConnection and SQL commands to 1. create a new db on a server 2. create a user with GRANT ADMIN ROLE and full control over the new db Source: https://bitbucket.org/reiniero/fpc_laz_patch_playground/downloads/firebir

Re: [fpc-pascal] Set size limit

2013-03-10 Thread Mark Morgan Lloyd
Juha Manninen wrote: No. As far as I understand, sets are stored in 1 byte internally - as binary values. 256 is the max number of elements (bit values) it can hold in a byte. This is one area where FPC could actually improve things. The 1 byte limit is purely historical. There are no 8-bit C

Re: [fpc-pascal] Set size limit

2013-03-10 Thread Rolf Grunsky
On 13-03-09 03:56 PM, Jonas Maebe wrote: On 09 Mar 2013, at 21:52, Daniel Gaspary wrote: The problem seems to be that TMyEnum has more than 256 elements. Can I specify such Set with some compiler option ? No. My fpc is pre 2.6, any change on new versions concerning Sets limits? No. Jo

Re: [fpc-pascal] Re: Connecting to Firebird using FPC/Lazarus over a LAN with user creation privilege

2013-03-10 Thread Mark Morgan Lloyd
Reinier Olislagers wrote: But I can't do that last step from a TIBConnection. There's obviously a possibility that I'm Doing It Wrong: what's the Firebird equivalent of PQExec(), I'm using isc_dsql_execute_immediate()? Strange. Setting the user to borg_um, the role to RDB$ADMIN, correct passwor

Re: [fpc-pascal] Set size limit

2013-03-10 Thread Howard Page-Clark
On 10/03/13 2:12, Jonas Maebe wrote: There is a already a test for larger set support: http://svn.freepascal.org/svn/fpc/trunk/tests/test/tset6.pp Nobody has worked yet on implementing it, but if anyone thinks it's easy to do, please go ahead. For larger sets, especially if they are sparse,

Re: [fpc-pascal] Set size limit

2013-03-10 Thread Juha Manninen
On Sun, Mar 10, 2013 at 4:19 PM, Florian Klämpfl wrote: >> This issue is similar. This kind of artificial limitation > I always wonder how people know more than me about the compiler :) > >> could easily be fixed. > Go ahead. :) Ok, I sent my reply too quickly. I must study the compiler at some d

Re: [fpc-pascal] Set size limit

2013-03-10 Thread Daniel Gaspary
On Sun, Mar 10, 2013 at 11:12 AM, Jonas Maebe wrote: > For larger sets, especially if they are sparse, a simple hashtable-based class > would probably be much faster and memory efficient Just some background.. I was using a Set because I needed a initialized constant "container" with a variable

Re: [fpc-pascal] Set size limit

2013-03-10 Thread Florian Klämpfl
Am 10.03.2013 15:00, schrieb Juha Manninen: > This issue is similar. This kind of artificial limitation I always wonder how people know more than me about the compiler :) > could easily be fixed. Go ahead. ___ fpc-pascal maillist - fpc-pascal@lists

[fpc-pascal] Re: Connecting to Firebird using FPC/Lazarus over a LAN with user creation privilege

2013-03-10 Thread Reinier Olislagers
On 9-3-2013 14:08, Mark Morgan Lloyd wrote: > I don't know whether anybody can help me with this one, but I'm working > on something where I need a program to be able to create login-capable > database users on-the-fly. I was hoping to be able to use either > PostgreSQL or Firebird as the backend,

Re: [fpc-pascal] Set size limit

2013-03-10 Thread Juha Manninen
On Sun, Mar 10, 2013 at 3:45 PM, Marco van de Voort wrote: > Sets are up to 32-byte (256bits), enums can be up to 32-bit. Ok, sorry. The limitation for sets is not one byte. Still, FPC could add support for still more bytes. 64-bit CPUs are now popular and the feature could easily be implemented

Re: [fpc-pascal] Set size limit

2013-03-10 Thread Jonas Maebe
On 10 Mar 2013, at 15:00, Juha Manninen wrote: > There are no 8-bit CPUs > supported by FPC that would justify it. It is unrelated to 8 bit cpus. Even Turbo Pascal 1.0 ran on a 16 bit cpu. > I am annoyed by some LCL bugs which are there only for Delphi compatibility. > This issue is similar. I

Re: [fpc-pascal] Set size limit

2013-03-10 Thread Juha Manninen
On Sun, Mar 10, 2013 at 2:38 PM, Graeme Geldenhuys wrote: > No. As far as I understand, sets are stored in 1 byte internally - as > binary values. 256 is the max number of elements (bit values) it can > hold in a byte. This is one area where FPC could actually improve things. The 1 byte limit is

Re: [fpc-pascal] Set size limit

2013-03-10 Thread Marco van de Voort
In our previous episode, Graeme Geldenhuys said: > On 2013-03-09 20:52, Daniel Gaspary wrote: > > > > The problem seems to be that TMyEnum has more than 256 elements. > > Can I specify such Set with some compiler option ? > > No. As far as I understand, sets are stored in 1 byte internally - as

Re: [fpc-pascal] Set size limit

2013-03-10 Thread Graeme Geldenhuys
On 2013-03-09 20:52, Daniel Gaspary wrote: > > The problem seems to be that TMyEnum has more than 256 elements. > Can I specify such Set with some compiler option ? No. As far as I understand, sets are stored in 1 byte internally - as binary values. 256 is the max number of elements (bit values)

[fpc-pascal] Re: Connecting to Firebird using FPC/Lazarus over a LAN with user creation privilege

2013-03-10 Thread Reinier Olislagers
On 10-3-2013 12:03, Mark Morgan Lloyd wrote: > Reinier Olislagers wrote: >> On 9-3-2013 19:56, Mark Morgan Lloyd wrote: >>> Reinier Olislagers wrote: On 9-3-2013 17:31, Mark Morgan Lloyd wrote: >> Well... >> Background: Create user via SQL: >> http://www.firebirdsql.org/refdocs/langrefupd25-se

Re: [fpc-pascal] Re: Connecting to Firebird using FPC/Lazarus over a LAN with user creation privilege

2013-03-10 Thread Mark Morgan Lloyd
Reinier Olislagers wrote: I've not tried that yet, but it's on the list. I've just spent a while checking that some related SQL works with PostgreSQL (i.e. getting quoting correct etc.) since it's easier to debug. As mentioned in other posts: you should be able to create users and assign datab

Re: [fpc-pascal] Re: Connecting to Firebird using FPC/Lazarus over a LAN with user creation privilege

2013-03-10 Thread Mark Morgan Lloyd
Reinier Olislagers wrote: On 9-3-2013 19:56, Mark Morgan Lloyd wrote: Reinier Olislagers wrote: On 9-3-2013 17:31, Mark Morgan Lloyd wrote: It identifies itself as 2.5, and by that I explicitly mean that I'm querying it rather than trusting any claims by the Debian package maintainer, and acco

[fpc-pascal] OT: Re: Connecting to Firebird using FPC/Lazarus over a LAN with user creation privilege

2013-03-10 Thread Reinier Olislagers
On 10-3-2013 11:26, Jonas Maebe wrote: > > On 10 Mar 2013, at 11:21, Mark Morgan Lloyd wrote: > >> reinierolislagers-re5jqeeqqe8avxtiumw...@public.gmane.org >> wrote: >> Have you tried the Firebird admin module that Ludo Brands wr

[fpc-pascal] Re: Connecting to Firebird using FPC/Lazarus over a LAN with user creation privilege

2013-03-10 Thread Reinier Olislagers
On 10-3-2013 11:21, Mark Morgan Lloyd wrote: > reinierolislagers-re5jqeeqqe8avxtiumw...@public.gmane.org wrote: >> On 9-3-2013 14:08, Mark Morgan Lloyd wrote: >>> I don't know whether anybody can help me with this one, but I'm working >>> on something where I need a program to be able to create log

Re: [fpc-pascal] Re: Connecting to Firebird using FPC/Lazarus over a LAN with user creation privilege

2013-03-10 Thread Jonas Maebe
On 10 Mar 2013, at 11:21, Mark Morgan Lloyd wrote: > reinierolislag...@gmail.com wrote: > Have you tried the Firebird admin module that Ludo Brands wrote? It >> connects using the FB service interface and allows user creation. >> Firebird also offers CREATE USER SQL AFAIR (since FB 2.5, perhaps e

Re: [fpc-pascal] Re: Connecting to Firebird using FPC/Lazarus over a LAN with user creation privilege

2013-03-10 Thread Mark Morgan Lloyd
reinierolislag...@gmail.com wrote: On 9-3-2013 14:08, Mark Morgan Lloyd wrote: I don't know whether anybody can help me with this one, but I'm working on something where I need a program to be able to create login-capable database users on-the-fly. I was hoping to be able to use either PostgreSQ

[fpc-pascal] Re: Connecting to Firebird using FPC/Lazarus over a LAN with user creation privilege

2013-03-10 Thread reinierolislagers
On 9-3-2013 14:08, Mark Morgan Lloyd wrote: > I don't know whether anybody can help me with this one, but I'm working > on something where I need a program to be able to create login-capable > database users on-the-fly. I was hoping to be able to use either > PostgreSQL or Firebird as the backend