PDO是否限制firebird 2.5的别名长度?

时间:2018-03-02 09:24:40

标签: php pdo firebird

我必须从firebird 2.5.2 DB

中读取记录

我正在将firebirdnew \PDO("firebird:dbname=server/3050:C:\DB\DBName.fdb", 'USERNAME', 'password'); 驱动程序

一起使用
SELECT ID AS I_KNOW_THIS_IS_A_VERY_VERY_VERY_LONG_ALIAS_NAME FROM TABLEX

我没有运行数据库,我只有读取权限,老实说,我对firebird本身并不了解。但是我只需要为导入目的运行一些简单的SELECT查询。

问题是我需要使用很长的别名(> 31个字符),比如

[
(int) 0 => [
    'I_KNOW_THIS_IS_A_VERY_VERY_VERY' => '1'
],

现在,当我通过PDO在PHP中运行查询时,该名称被截断为31个字符,记录集就像

# Given three ints, a b c, print True if b is greater than a,  
# and c is greater than b. However, with the exception that if 
# "bOk" is True, b does not need to be greater than a. 

a = int(input())
b = int(input())
c = int(input())
bOk = bool(input())

print(((bOk and c > b) or (b > a and c > b)))

(请注意,查询正确执行且没有错误)

我读到firebird 3对列名有31个字节的限制,但没有firebird 2.5

事实上,当我在客户端(带有jdbcb的DBeaver)中运行相同的查询时,我对别名没有任何问题

所以在我看来这是PDO的限制,而不是火鸟。

有什么办法可以解决这个问题吗? (当然,除了使用较短的别名外)

0 个答案:

没有答案