Richard,
> The goal is to have
>
> locate( stra, strb) = position(strb in stra)
Also, this will run faster if you do it as a SQL function:
CREATE FUNCTION locate ( text, text ) RETURNS INT AS '
SELECT POSITION($2, $1);
' LANGUAGE SQL IMMUTABLE STRICT;
--
Josh Berkus
Aglio Database Solutions
Sa
Richard,
>--- CREATE OR REPLACE FUNCTION public.locate(bpchar,
> bpchar)
> RETURNS int4 AS
> '
> -- search for the position of $2 in $1
>
> declare
> srcstr alias for $1;
> searchstr alias for $2;
>
> begin
> return position(searchstr in srcstr);
You're missi
Richard Sydney-Smith wrote:
CREATE OR REPLACE FUNCTION public.locate(bpchar, bpchar) RETURNS
int4 AS ' -- search for the position of $2 in $1
declare srcstr alias for $1; searchstr alias for $2;
begin return position(searchstr in srcstr); ' LANGUAGE 'plpgsql'
VOLATILE;
You are missing the "end"
As I am converting from Sybase I wanted to create a
function which would replicate the behaviour of the sybase "Locate"
command.
The goal is to have
locate( stra, strb) = position(strb in
stra)
where "position" is the standard postgres function
for the index position of string "A" in
On Sat, Sep 27, 2003 at 08:26:16PM -0400, Bruce Momjian wrote:
> Bertrand Petit wrote:
> >
> > Does the figures stored in pg_class.relpages include the pages
> > consumed by the toast tables linked to a normal table?
>
> No. See the chapter on monitoring disk space for more information.
Bertrand Petit <[EMAIL PROTECTED]> writes:
> Does the figures stored in pg_class.relpages include the pages
> consumed by the toast tables linked to a normal table?
No. The toast tables have their own pg_class.relpages entries ...
regards, tom lane
Bertrand Petit wrote:
>
> Does the figures stored in pg_class.relpages include the pages
> consumed by the toast tables linked to a normal table?
No. See the chapter on monitoring disk space for more information.
--
Bruce Momjian| http://candle.pha.pa.us
[EMA
Does the figures stored in pg_class.relpages include the pages
consumed by the toast tables linked to a normal table?
--
%!PS
297.6 420.9 translate 90 rotate 0 setgray gsave 0 1 1{pop 0 180 moveto 100
180 170 100 170 -10 curveto 180 -9 180 -9 190 -10 curveto 190 100 100 180
0 180 curveto
"George A.J" <[EMAIL PROTECTED]> writes:
> When i searched the pg_class i found the temp table name more than once.
> ie, a temporary table is created for each connection.I cannot distingush
> the temp tables. But the tables are in different schema.
> Is there a method to get the current temporar
On Saturday 27 September 2003 14:31, George A.J wrote:
> hi,
>
> I am using postgresql 7.3.2. Is there any function to determine
> whether a table exists in the database.Or is there any function
> that returns the current temp schema.
> I am using a pl/pgsql function that create and drop a temporar
hi,
I am using postgresql 7.3.2. Is there any function to determine whether a table exists in the database.Or is there any function that returns the current temp schema.I am using a pl/pgsql function that create and drop a temporary table.The procedure run correctly for the first time for each data
On 26 Sep 2003 at 16:55, Josh Berkus wrote:
> Dan,
>
> > I'm trying to remove items from a set which are similar to items in
> > another set.
>
>
> > In short, we remove all items from MASTER which are under the directories
> > specified in MATCHES.
>
> from your example, you are trying to re
12 matches
Mail list logo