<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://purl.org/rss/1.0/" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:syn="http://purl.org/rss/1.0/modules/syndication/" xmlns:admin="http://webns.net/mvcb/">
  <channel rdf:about="http://permalink.gmane.org/gmane.comp.db.postgresql.dbdpg">
    <title>gmane.comp.db.postgresql.dbdpg</title>
    <link>http://permalink.gmane.org/gmane.comp.db.postgresql.dbdpg</link>
    <description/>
    <syn:updatePeriod>hourly</syn:updatePeriod>
    <syn:updateFrequency>1</syn:updateFrequency>
    <syn:updateBase>1901-01-01T00:00+00:00</syn:updateBase>
    <items>
      <rdf:Seq>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.db.postgresql.dbdpg/2770"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.db.postgresql.dbdpg/2769"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.db.postgresql.dbdpg/2768"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.db.postgresql.dbdpg/2767"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.db.postgresql.dbdpg/2766"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.db.postgresql.dbdpg/2765"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.db.postgresql.dbdpg/2764"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.db.postgresql.dbdpg/2763"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.db.postgresql.dbdpg/2762"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.db.postgresql.dbdpg/2761"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.db.postgresql.dbdpg/2760"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.db.postgresql.dbdpg/2759"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.db.postgresql.dbdpg/2758"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.db.postgresql.dbdpg/2762"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.db.postgresql.dbdpg/2761"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.db.postgresql.dbdpg/2760"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.db.postgresql.dbdpg/2759"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.db.postgresql.dbdpg/2758"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.db.postgresql.dbdpg/2760"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.db.postgresql.dbdpg/2759"/>
      </rdf:Seq>
    </items>
    <image rdf:resource="http://gmane.org/img/gmane-25t.png"/>
    <textinput rdf:resource=""/>
  </channel>
  <image rdf:about="http://gmane.org/img/gmane-25t.png">
    <title>Gmane</title>
    <url>http://gmane.org/img/gmane-25t.png</url>
    <link>http://gmane.org</link>
  </image>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.db.postgresql.dbdpg/2770">
    <title>DBD::Pg version 2.19.1 released</title>
    <link>http://permalink.gmane.org/gmane.comp.db.postgresql.dbdpg/2770</link>
    <description>&lt;pre&gt;
-----BEGIN PGP SIGNED MESSAGE-----
Hash: RIPEMD160

Version 2.19.1 of DBD::Pg, the Perl interface to PostgreSQL, 
has just been released. This (and 2.19.0) fixes some serious 
bugs, so upgrading is recommended for all users. You can 
find it at your local CPAN mirror, or at:

http://search.cpan.org/~turnstep/DBD-Pg-2.19.1/

Checksums, MD5 and SHA1:

3a86ac826f5285003b87c6a8b225e0c4  DBD-Pg-2.19.1.tar.gz
0d0bd7daf2c24758716fbbde686e4d66cf81a206  DBD-Pg-2.19.1.tar.gz

Complete list of changes for 2.19.0 and 2.19.1:

  - Fix crash when passing in an array with undefined elements. [GSM]

  - Use proper formatting for warn() and croak() (CPAN bug #75642)
    [Niko Tyni]

  - Fix localized regex in test (CPAN bug #70759)

  - Fix for named placeholders (CPAN bug #70953) [Jan Pazdziora]

  - Various fixes to the array-marshalling code [Noah Misch, Mark 
    Stosberg, and David Christensen] (CPAN bug #58552)

  - Allow hi-bit chars in dollar-quoted identifiers 
    [David Christensen] (CPAN bug #73832)

  - Have do&lt;/pre&gt;</description>
    <dc:creator>Greg Sabino Mullane</dc:creator>
    <dc:date>2012-03-11T23:00:37</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.db.postgresql.dbdpg/2769">
    <title>feature request</title>
    <link>http://permalink.gmane.org/gmane.comp.db.postgresql.dbdpg/2769</link>
    <description>&lt;pre&gt;Hi,
I need to get the type for a column from query result, but for
Postgres user defined types (composite types) I cannot find DBD::Pg
field  that contains such a  info.
For example for the query:
select A as class_record from pg_class A;

in the resulting DBI statement I have:
$$sth{TYPE}[0]: 0
$$sth{pg_type}[0]: 'unknown'

when the pqlib call PQftype() returns actual OID of the pg_class type.

Currently all calls to  PQftype() are wrapped around pg_type_data()
(for example  pg_type_data((int)PQftype(imp_sth-&amp;gt;result, fields)), and
 pg_type_data() always returns NULL if the type is not standard.

I think if the result of PQftype() can be stored in a new pg specific
field (for example pg_type_oid) this will give a way of using composit
types without changing current behavior of the driver ?

Best regards!
Manol

&lt;/pre&gt;</description>
    <dc:creator>Манол Ружинов</dc:creator>
    <dc:date>2012-02-03T16:52:23</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.db.postgresql.dbdpg/2768">
    <title>Re: [DBD::Pg] allow hi-bit chars in dollar-quoted identifiers</title>
    <link>http://permalink.gmane.org/gmane.comp.db.postgresql.dbdpg/2768</link>
    <description>&lt;pre&gt;

Excellent, thank you. Would be get to get a release out with these fixes.

What’s the status of the UTF-8 stuff?

David



&lt;/pre&gt;</description>
    <dc:creator>David E. Wheeler</dc:creator>
    <dc:date>2012-01-17T20:11:40</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.db.postgresql.dbdpg/2767">
    <title>Re: [DBD::Pg] allow hi-bit chars in dollar-quoted identifiers</title>
    <link>http://permalink.gmane.org/gmane.comp.db.postgresql.dbdpg/2767</link>
    <description>&lt;pre&gt;Committed.

At some point in the near future I'm going to revert the utf8 changes in the master branch until things are resolved with the unicode changes.

Regards,

David
--
David Christensen
End Point Corporation
david-O9fzpki4YnJWk0Htik3J/w&amp;lt; at &amp;gt;public.gmane.org





&lt;/pre&gt;</description>
    <dc:creator>David Christensen</dc:creator>
    <dc:date>2012-01-17T20:10:04</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.db.postgresql.dbdpg/2766">
    <title>Re: [DBD::Pg] allow hi-bit chars in dollar-quoted identifiers</title>
    <link>http://permalink.gmane.org/gmane.comp.db.postgresql.dbdpg/2766</link>
    <description>&lt;pre&gt;

Oh, awesomesauce, thanks!

David


&lt;/pre&gt;</description>
    <dc:creator>David E. Wheeler</dc:creator>
    <dc:date>2012-01-17T18:37:37</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.db.postgresql.dbdpg/2765">
    <title>Re: [DBD::Pg] allow hi-bit chars in dollar-quoted identifiers</title>
    <link>http://permalink.gmane.org/gmane.comp.db.postgresql.dbdpg/2765</link>
    <description>&lt;pre&gt;
On Jan 12, 2012, at 11:15 PM, David E. Wheeler wrote:



Hi David,

I created a new branch for the utf-8 stuff in the main repo.  I'll review/commit this to master shortly.

Regards,

David
--
David Christensen
End Point Corporation
david-O9fzpki4YnJWk0Htik3J/w&amp;lt; at &amp;gt;public.gmane.org





&lt;/pre&gt;</description>
    <dc:creator>David Christensen</dc:creator>
    <dc:date>2012-01-17T18:34:35</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.db.postgresql.dbdpg/2764">
    <title>Re: [DBD::Pg] allow hi-bit chars in dollar-quoted identifiers</title>
    <link>http://permalink.gmane.org/gmane.comp.db.postgresql.dbdpg/2764</link>
    <description>&lt;pre&gt;

Sorry, I meant this:

  https://rt.cpan.org/Ticket/Display.html?id=58552

Best,

David


&lt;/pre&gt;</description>
    <dc:creator>David E. Wheeler</dc:creator>
    <dc:date>2012-01-13T05:15:21</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.db.postgresql.dbdpg/2763">
    <title>Re: [DBD::Pg] allow hi-bit chars in dollar-quoted identifiers</title>
    <link>http://permalink.gmane.org/gmane.comp.db.postgresql.dbdpg/2763</link>
    <description>&lt;pre&gt;

Is this in a branch separate from the Unicode stuff? If so, care to also commit this?

  https://rt.cpan.org/Ticket/Display.html?id=72551

Best,

David


&lt;/pre&gt;</description>
    <dc:creator>David E. Wheeler</dc:creator>
    <dc:date>2012-01-13T05:14:53</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.db.postgresql.dbdpg/2762">
    <title>Re: Inconsistent behaviour with Dollar-quoted String Constants</title>
    <link>http://permalink.gmane.org/gmane.comp.db.postgresql.dbdpg/2762</link>
    <description>&lt;pre&gt;Proposed patch:

commit 830ba62d179fca2ccf01d7900aa58676a4a17f9c
Author: David Christensen &amp;lt;david-O9fzpki4YnJWk0Htik3J/w&amp;lt; at &amp;gt;public.gmane.org&amp;gt;
Date:   Sun Jan 8 22:16:40 2012 -0600

    allow hi-bit chars in dollar-quoted identifiers

diff --git a/dbdimp.c b/dbdimp.c
index 0c1d22f..b6f1235 100644
--- a/dbdimp.c
+++ b/dbdimp.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1785,12 +1785,12 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static void pg_st_split_statement (pTHX_ imp_sth_t * imp_sth, int version, char
                        (*statement == '$' 
                         || *statement == '_'
                         || (*statement &amp;gt;= 'A' &amp;amp;&amp;amp; *statement &amp;lt;= 'Z') 
-                        || (*statement &amp;gt;= 'a' &amp;amp;&amp;amp; *statement &amp;lt;= 'z'))) {
+                        || (*statement &amp;gt;= 'a' &amp;amp;&amp;amp; *statement &amp;lt;= 'z')
+                        || ((unsigned char)*statement &amp;gt;= (unsigned char)'\200'))) {
                        /* "SQL identifiers must begin with a letter (a-z, but also letters with diacritical marks and non-Latin letters) 
                 or an underscore (_). Subsequent characters in an id&lt;/pre&gt;</description>
    <dc:creator>David Christensen</dc:creator>
    <dc:date>2012-01-09T04:22:39</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.db.postgresql.dbdpg/2761">
    <title>Re: Inconsistent behaviour with Dollar-quoted String Constants</title>
    <link>http://permalink.gmane.org/gmane.comp.db.postgresql.dbdpg/2761</link>
    <description>&lt;pre&gt;

Thanks, added to the ticket.

  https://rt.cpan.org/Ticket/Display.html?id=73832

Best,

Davd

&lt;/pre&gt;</description>
    <dc:creator>David E. Wheeler</dc:creator>
    <dc:date>2012-01-09T03:28:15</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.db.postgresql.dbdpg/2760">
    <title>Re: Inconsistent behaviour with Dollar-quoted String Constants</title>
    <link>http://permalink.gmane.org/gmane.comp.db.postgresql.dbdpg/2760</link>
    <description>&lt;pre&gt;

On 01/08/2012 03:51 PM, David E. Wheeler wrote:

Any non-ASCII character qualifies. From scan.l:

    dolq_start      [A-Za-z\200-\377_]
    dolq_cont       [A-Za-z\200-\377_0-9]
    dolqdelim       \$({dolq_start}{dolq_cont}*)?\$


cheers

andrew



&lt;/pre&gt;</description>
    <dc:creator>Andrew Dunstan</dc:creator>
    <dc:date>2012-01-08T23:33:12</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.db.postgresql.dbdpg/2759">
    <title>Re: Inconsistent behaviour with Dollar-quoted String Constants</title>
    <link>http://permalink.gmane.org/gmane.comp.db.postgresql.dbdpg/2759</link>
    <description>&lt;pre&gt;

It probably wouldn’t if you passed parameters to it.

Anyway, the ppg docs](http://www.postgresql.org/docs/9.1/static/sql-syntax-lexical.html) say about dollar quoting:

“The tag, if any, of a dollar-quoted string follows the same rules as an unquoted identifier, except that it cannot contain a dollar sign.”

And for an unquoted identifier, they say:

“SQL identifiers and key words must begin with a letter (a-z, but also letters with diacritical marks and non-Latin letters) or an underscore (_). Subsequent characters in an identifier or key word can be letters, underscores, digits (0-9), or dollar signs ($).”

Does 北 qualify as a non-Latin letter? If you can create a table with that character, it’s valid. I just tried:

    CREATE TABLE 北 (it int);

And it worked. So this looks like a bug in DBD::Pg, which recognizes dollar quoting when it parses for placeholders, but not to the letter of the documentation, I guess.

Would you mind reporting this bug by sending an email to bug-dbd-pg-ROqZdf&lt;/pre&gt;</description>
    <dc:creator>David E. Wheeler</dc:creator>
    <dc:date>2012-01-08T20:51:18</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.db.postgresql.dbdpg/2758">
    <title>Inconsistent behaviour with Dollar-quoted String Constants</title>
    <link>http://permalink.gmane.org/gmane.comp.db.postgresql.dbdpg/2758</link>
    <description>&lt;pre&gt;Hello,

I am using UTF-8 characters within Dollar-quoted tags.
Following code is the problem-setting.

--- CODE BEGIN ---
#!/usr/bin/perl
use strict; use DBI;
my $db = DBI-&amp;gt;connect(
     "dbi:Pg:dbname=$PgDbName;host=$PgHost;port=$PgPort",
     $PgSqlUser, $PgSqlPass);

my $txt = '2';
my $delim = "\$\x{5317}\$";

my $sql = "SELECT $delim$txt$delim";
print "SQL = '$sql'\n";
$db-&amp;gt;do($sql);
print "after do\n";
$db-&amp;gt;selectrow_hashref($sql);
print "after_selectrow_hashref\n";
--- CODE END ---

The script dies during selectrow_hashref and the output of the script is

--- OUTPUT BEGIN ---
SQL = 'SELECT $北$2$北$'
after do
Invalid placeholders: must start at $1 and increment one at a time 
(expected: $1)
--- OUTPUT END ---

It seems like $2 is interpreted as placeholder before the evaluation of 
Dollar-quoting, but only in $db-&amp;gt;selectrow_hashref().
The inconsistent part is that $db-&amp;gt;do() works just fine.

Regards,
Markus

System: Debian sid with libdbd-pg-perl 2.18.1-1+b1 and perl 5.14.2-6

&lt;/pre&gt;</description>
    <dc:creator>mhoram-Mmb7MZpHnFY&lt; at &gt;public.gmane.org</dc:creator>
    <dc:date>2012-01-07T14:49:05</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.db.postgresql.dbdpg/2762">
    <title>Re: Inconsistent behaviour with Dollar-quoted String Constants</title>
    <link>http://permalink.gmane.org/gmane.comp.db.postgresql.dbdpg/2762</link>
    <description>&lt;pre&gt;Proposed patch:

commit 830ba62d179fca2ccf01d7900aa58676a4a17f9c
Author: David Christensen &amp;lt;david-O9fzpki4YnJWk0Htik3J/w&amp;lt; at &amp;gt;public.gmane.org&amp;gt;
Date:   Sun Jan 8 22:16:40 2012 -0600

    allow hi-bit chars in dollar-quoted identifiers

diff --git a/dbdimp.c b/dbdimp.c
index 0c1d22f..b6f1235 100644
--- a/dbdimp.c
+++ b/dbdimp.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1785,12 +1785,12 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static void pg_st_split_statement (pTHX_ imp_sth_t * imp_sth, int version, char
                        (*statement == '$' 
                         || *statement == '_'
                         || (*statement &amp;gt;= 'A' &amp;amp;&amp;amp; *statement &amp;lt;= 'Z') 
-                        || (*statement &amp;gt;= 'a' &amp;amp;&amp;amp; *statement &amp;lt;= 'z'))) {
+                        || (*statement &amp;gt;= 'a' &amp;amp;&amp;amp; *statement &amp;lt;= 'z')
+                        || ((unsigned char)*statement &amp;gt;= (unsigned char)'\200'))) {
                        /* "SQL identifiers must begin with a letter (a-z, but also letters with diacritical marks and non-Latin letters) 
                 or an underscore (_). Subsequent characters in an id&lt;/pre&gt;</description>
    <dc:creator>David Christensen</dc:creator>
    <dc:date>2012-01-09T04:22:39</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.db.postgresql.dbdpg/2761">
    <title>Re: Inconsistent behaviour with Dollar-quoted String Constants</title>
    <link>http://permalink.gmane.org/gmane.comp.db.postgresql.dbdpg/2761</link>
    <description>&lt;pre&gt;

Thanks, added to the ticket.

  https://rt.cpan.org/Ticket/Display.html?id=73832

Best,

Davd

&lt;/pre&gt;</description>
    <dc:creator>David E. Wheeler</dc:creator>
    <dc:date>2012-01-09T03:28:15</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.db.postgresql.dbdpg/2760">
    <title>Re: Inconsistent behaviour with Dollar-quoted String Constants</title>
    <link>http://permalink.gmane.org/gmane.comp.db.postgresql.dbdpg/2760</link>
    <description>&lt;pre&gt;

On 01/08/2012 03:51 PM, David E. Wheeler wrote:

Any non-ASCII character qualifies. From scan.l:

    dolq_start      [A-Za-z\200-\377_]
    dolq_cont       [A-Za-z\200-\377_0-9]
    dolqdelim       \$({dolq_start}{dolq_cont}*)?\$


cheers

andrew



&lt;/pre&gt;</description>
    <dc:creator>Andrew Dunstan</dc:creator>
    <dc:date>2012-01-08T23:33:12</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.db.postgresql.dbdpg/2759">
    <title>Re: Inconsistent behaviour with Dollar-quoted String Constants</title>
    <link>http://permalink.gmane.org/gmane.comp.db.postgresql.dbdpg/2759</link>
    <description>&lt;pre&gt;

It probably wouldn’t if you passed parameters to it.

Anyway, the ppg docs](http://www.postgresql.org/docs/9.1/static/sql-syntax-lexical.html) say about dollar quoting:

“The tag, if any, of a dollar-quoted string follows the same rules as an unquoted identifier, except that it cannot contain a dollar sign.”

And for an unquoted identifier, they say:

“SQL identifiers and key words must begin with a letter (a-z, but also letters with diacritical marks and non-Latin letters) or an underscore (_). Subsequent characters in an identifier or key word can be letters, underscores, digits (0-9), or dollar signs ($).”

Does 北 qualify as a non-Latin letter? If you can create a table with that character, it’s valid. I just tried:

    CREATE TABLE 北 (it int);

And it worked. So this looks like a bug in DBD::Pg, which recognizes dollar quoting when it parses for placeholders, but not to the letter of the documentation, I guess.

Would you mind reporting this bug by sending an email to bug-dbd-pg-ROqZdf&lt;/pre&gt;</description>
    <dc:creator>David E. Wheeler</dc:creator>
    <dc:date>2012-01-08T20:51:18</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.db.postgresql.dbdpg/2758">
    <title>Inconsistent behaviour with Dollar-quoted String Constants</title>
    <link>http://permalink.gmane.org/gmane.comp.db.postgresql.dbdpg/2758</link>
    <description>&lt;pre&gt;Hello,

I am using UTF-8 characters within Dollar-quoted tags.
Following code is the problem-setting.

--- CODE BEGIN ---
#!/usr/bin/perl
use strict; use DBI;
my $db = DBI-&amp;gt;connect(
     "dbi:Pg:dbname=$PgDbName;host=$PgHost;port=$PgPort",
     $PgSqlUser, $PgSqlPass);

my $txt = '2';
my $delim = "\$\x{5317}\$";

my $sql = "SELECT $delim$txt$delim";
print "SQL = '$sql'\n";
$db-&amp;gt;do($sql);
print "after do\n";
$db-&amp;gt;selectrow_hashref($sql);
print "after_selectrow_hashref\n";
--- CODE END ---

The script dies during selectrow_hashref and the output of the script is

--- OUTPUT BEGIN ---
SQL = 'SELECT $北$2$北$'
after do
Invalid placeholders: must start at $1 and increment one at a time 
(expected: $1)
--- OUTPUT END ---

It seems like $2 is interpreted as placeholder before the evaluation of 
Dollar-quoting, but only in $db-&amp;gt;selectrow_hashref().
The inconsistent part is that $db-&amp;gt;do() works just fine.

Regards,
Markus

System: Debian sid with libdbd-pg-perl 2.18.1-1+b1 and perl 5.14.2-6

&lt;/pre&gt;</description>
    <dc:creator>mhoram-Mmb7MZpHnFY&lt; at &gt;public.gmane.org</dc:creator>
    <dc:date>2012-01-07T14:49:05</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.db.postgresql.dbdpg/2760">
    <title>Re: Inconsistent behaviour with Dollar-quoted String Constants</title>
    <link>http://permalink.gmane.org/gmane.comp.db.postgresql.dbdpg/2760</link>
    <description>&lt;pre&gt;

On 01/08/2012 03:51 PM, David E. Wheeler wrote:

Any non-ASCII character qualifies. From scan.l:

    dolq_start      [A-Za-z\200-\377_]
    dolq_cont       [A-Za-z\200-\377_0-9]
    dolqdelim       \$({dolq_start}{dolq_cont}*)?\$


cheers

andrew



&lt;/pre&gt;</description>
    <dc:creator>Andrew Dunstan</dc:creator>
    <dc:date>2012-01-08T23:33:12</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.db.postgresql.dbdpg/2759">
    <title>Re: Inconsistent behaviour with Dollar-quoted String Constants</title>
    <link>http://permalink.gmane.org/gmane.comp.db.postgresql.dbdpg/2759</link>
    <description>&lt;pre&gt;

It probably wouldn’t if you passed parameters to it.

Anyway, the ppg docs](http://www.postgresql.org/docs/9.1/static/sql-syntax-lexical.html) say about dollar quoting:

“The tag, if any, of a dollar-quoted string follows the same rules as an unquoted identifier, except that it cannot contain a dollar sign.”

And for an unquoted identifier, they say:

“SQL identifiers and key words must begin with a letter (a-z, but also letters with diacritical marks and non-Latin letters) or an underscore (_). Subsequent characters in an identifier or key word can be letters, underscores, digits (0-9), or dollar signs ($).”

Does 北 qualify as a non-Latin letter? If you can create a table with that character, it’s valid. I just tried:

    CREATE TABLE 北 (it int);

And it worked. So this looks like a bug in DBD::Pg, which recognizes dollar quoting when it parses for placeholders, but not to the letter of the documentation, I guess.

Would you mind reporting this bug by sending an email to bug-dbd-pg-ROqZdf&lt;/pre&gt;</description>
    <dc:creator>David E. Wheeler</dc:creator>
    <dc:date>2012-01-08T20:51:18</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.db.postgresql.dbdpg/2758">
    <title>Inconsistent behaviour with Dollar-quoted String Constants</title>
    <link>http://permalink.gmane.org/gmane.comp.db.postgresql.dbdpg/2758</link>
    <description>&lt;pre&gt;Hello,

I am using UTF-8 characters within Dollar-quoted tags.
Following code is the problem-setting.

--- CODE BEGIN ---
#!/usr/bin/perl
use strict; use DBI;
my $db = DBI-&amp;gt;connect(
     "dbi:Pg:dbname=$PgDbName;host=$PgHost;port=$PgPort",
     $PgSqlUser, $PgSqlPass);

my $txt = '2';
my $delim = "\$\x{5317}\$";

my $sql = "SELECT $delim$txt$delim";
print "SQL = '$sql'\n";
$db-&amp;gt;do($sql);
print "after do\n";
$db-&amp;gt;selectrow_hashref($sql);
print "after_selectrow_hashref\n";
--- CODE END ---

The script dies during selectrow_hashref and the output of the script is

--- OUTPUT BEGIN ---
SQL = 'SELECT $北$2$北$'
after do
Invalid placeholders: must start at $1 and increment one at a time 
(expected: $1)
--- OUTPUT END ---

It seems like $2 is interpreted as placeholder before the evaluation of 
Dollar-quoting, but only in $db-&amp;gt;selectrow_hashref().
The inconsistent part is that $db-&amp;gt;do() works just fine.

Regards,
Markus

System: Debian sid with libdbd-pg-perl 2.18.1-1+b1 and perl 5.14.2-6

&lt;/pre&gt;</description>
    <dc:creator>mhoram-Mmb7MZpHnFY&lt; at &gt;public.gmane.org</dc:creator>
    <dc:date>2012-01-07T14:49:05</dc:date>
  </item>
  <textinput rdf:about="http://search.gmane.org/?group=$group=gmane.comp.db.postgresql.dbdpg">
    <title>Search Engine</title>
    <description>Search the mailing list at Gmane</description>
    <name>query</name>
    <link>http://search.gmane.org/?group=$group=gmane.comp.db.postgresql.dbdpg</link>
  </textinput>
</rdf:RDF>

