pg.ddx.io pgsql-sql@postgresql.org mailing list archive
help / color / mirror / Atom feedDollar quoted strings
2+ messages / 2 participants
[nested] [flat]
* Dollar quoted strings
@ 2010-03-24 20:38 John Gage <jsmgage@numericable.fr>
0 siblings, 1 reply; 2+ messages in thread
From: John Gage @ 2010-03-24 20:38 UTC (permalink / raw)
To: Josh Kupershmidt <schmiddy@gmail.com>; +Cc: pgsql-sql@postgresql.org, Robert Manning <robert.m.manning@gmail.com>; squirrel-sql-users@lists.sourceforge.net
Thanks very much for this. I am using 8.4.2.
This query works as you describe in pgAdmin.
I had tried it in the SquirrelSQL client, which is where it produced the
<Unknown(2,003)>
result.
Obviously, this is a SquirrelSQL problem at least in part.
What does <Unknown(2,003)> mean?
Thanks again for directing me to the doc's on dollar quoting.
John
On Mar 24, 2010, at 8:13 PM, Josh Kupershmidt wrote:
> On Wed, Mar 24, 2010 at 2:38 PM, John Gage <jsmgage@gmail.com> wrote:
>> In going through the arcana of string functions, I have come across
>> the
>> following series of selects that contain, for me, a mysterious "$re
>> $".
>>
>> -- return all matches from regexp
>> SELECT regexp_matches('foobarbequebaz', $re$(bar)(beque)$re$);
>
> The $re$ is just an arbitrary identifier for a dollar-quoted string
> constant. See:
>
> http://www.postgresql.org/docs/current/static/sql-syntax-lexical.html
>
> Maybe you're on an old version which doesn't support dollar-quoted
> strings?
>
> On 8.3 for the above query, I get:
>
> SELECT regexp_matches('foobarbequebaz', $re$(bar)(beque)$re$);
> regexp_matches
> ----------------
> {bar,beque}
> (1 row)
>
> Josh
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: Dollar quoted strings
@ 2010-03-25 03:20 Robert Manning <robert.m.manning@gmail.com>
parent: John Gage <jsmgage@numericable.fr>
0 siblings, 0 replies; 2+ messages in thread
From: Robert Manning @ 2010-03-25 03:20 UTC (permalink / raw)
To: John Gage <jsmgage@numericable.fr>; +Cc: Josh Kupershmidt <schmiddy@gmail.com>; pgsql-sql; squirrel-sql-users@lists.sourceforge.net
Hi John,
The type code 2003 indicates an SQL99 column type of ARRAY, which is
not currently supported for rendering/editing. Here is the feature
request for SQuirreL SQL Client to track this feature:
https://sourceforge.net/tracker/?func=detail&aid=2972937&group_id=28383&atid=393417
Rob
On Wed, Mar 24, 2010 at 4:38 PM, John Gage <jsmgage@numericable.fr> wrote:
> Thanks very much for this. I am using 8.4.2.
>
> This query works as you describe in pgAdmin.
>
> I had tried it in the SquirrelSQL client, which is where it produced the
>
> <Unknown(2,003)>
>
> result.
>
> Obviously, this is a SquirrelSQL problem at least in part.
>
> What does <Unknown(2,003)> mean?
>
> Thanks again for directing me to the doc's on dollar quoting.
>
> John
>
>
> On Mar 24, 2010, at 8:13 PM, Josh Kupershmidt wrote:
>
>> On Wed, Mar 24, 2010 at 2:38 PM, John Gage <jsmgage@gmail.com> wrote:
>>>
>>> In going through the arcana of string functions, I have come across the
>>> following series of selects that contain, for me, a mysterious "$re$".
>>>
>>> -- return all matches from regexp
>>> SELECT regexp_matches('foobarbequebaz', $re$(bar)(beque)$re$);
>>
>> The $re$ is just an arbitrary identifier for a dollar-quoted string
>> constant. See:
>>
>> http://www.postgresql.org/docs/current/static/sql-syntax-lexical.html
>>
>> Maybe you're on an old version which doesn't support dollar-quoted
>> strings?
>>
>> On 8.3 for the above query, I get:
>>
>> SELECT regexp_matches('foobarbequebaz', $re$(bar)(beque)$re$);
>> regexp_matches
>> ----------------
>> {bar,beque}
>> (1 row)
>>
>> Josh
>
>
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2010-03-25 03:20 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2010-03-24 20:38 Dollar quoted strings John Gage <jsmgage@numericable.fr>
2010-03-25 03:20 ` Robert Manning <robert.m.manning@gmail.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox