Ow Mun Heng wrote:
Input is of form
'ppp','aaa','bbb'
I want it to be stripped of quotes to become
ppp,aaa,bbb
escaping the quote would work but it means I will have
to do some magic on the input as well to escape it prior
to replacing it.
select replace('AB\'A','\'','C') this
Just wonder if anyone here uses Excel to connect to PG via ODBC.
I'm using it extensively as my platform to get data from PG/MSSQL
directly into excel. (Excel uses the msqry32.exe file which is like a
stripped down sql query tool and returns data directly into excel)
When using mssql, connecting
What if its just SLEEP for 1 second. Why would it keep my stored procedure
hanging ?
On 10/10/07, Michal Taborsky - Internet Mall [EMAIL PROTECTED]
wrote:
Jasbinder Singh Bali napsal(a):
Instead of that, I re-engineered my while loop in the stored procedure
as follows.
...
I was
On Wed, 2007-10-10 at 09:11 +0200, Albe Laurenz wrote:
Ow Mun Heng wrote:
Input is of form
'ppp','aaa','bbb'
I want it to be stripped of quotes to become
ppp,aaa,bbb
escaping the quote would work but it means I will have
to do some magic on the input as well to escape it
I am finding out for the first time that by having a database created
with the name: MyTest, I cannot do a simple query as follows:
postgres=# select * from MyTest.public.cars;
ERROR: cross-database references are not implemented: mytest.public.cars
Notice, however since I created a cars table
This error probably does not have anything to do with the case of your
database name. Instead you probably logged into a database which is not
MyTest, because it is not possible to log into a database x and make a
query on database y.
Christian Rengstl M.A.
Klinik und Poliklinik für Innere
Daniel B. Thurman wrote:
I am finding out for the first time that by having a database created
with the name: MyTest, I cannot do a simple query as follows:
postgres=# select * from MyTest.public.cars;
ERROR: cross-database references are not implemented: mytest.public.cars
Correct - a query
Jasbinder Singh Bali napsal(a):
Instead of that, I re-engineered my while loop in the stored procedure
as follows.
...
I was wondering how to implement the SLEEP functionality here.
Hello.
I can't comment the function itself, but I want to bring something else
to your attention. Note, that
Daniel,
please try:
select * from MyTest.public.cars;
mixed cases need those , per SQL-Standard. In my experienced mixed cases in
qualifiers which cross OS-barriers cause more trouble then use (...
filenames with WebServers ...)
Harald
postgres=# select * from MyTest.public.cars;
ERROR:
Jasbinder Singh Bali wrote:
What if its just SLEEP for 1 second. Why would it keep my stored procedure
hanging ?
Because presumably your loop-condition isn't under your control
(otherwise you wouldn't need to sleep).
Can you *always* guarantee the condition (a=b) will happen within a
my loop is a busy wait and keeps iterating until a=b condition is met.
However, it would lead to millions of instructions executing per second.
So to save resources, I want to keep a sleep before re-iterating. Don't
understand how is SLEEP disastrous here even if i don't know when is my loop
Jasbinder Singh Bali wrote:
my loop is a busy wait and keeps iterating until a=b condition is met.
However, it would lead to millions of instructions executing per second.
So to save resources, I want to keep a sleep before re-iterating. Don't
understand how is SLEEP disastrous here even if i
Ow Mun Heng wrote:
Input is of form
'ppp','aaa','bbb'
I want it to be stripped of quotes to become
ppp,aaa,bbb
I'm a little confused that you think that you will have to
escape single quotes in the input.
What is your use case? Normally the input is in some variable
in some
2007/10/10, Daniel B. Thurman [EMAIL PROTECTED]:
I am finding out for the first time that by having a database created
with the name: MyTest, I cannot do a simple query as follows:
postgres=# select * from MyTest.public.cars;
ERROR: cross-database references are not implemented:
On Tue, 2007-10-09 at 11:46 +0200, Andrew Kelly wrote:
Hi folks,
please forgive what feels like a no-brainer even as I ask it, but...
snip
Just wanted to thank everybody who's provided feedback. I'm squared away
now, and very appreciative of all the help.
Andy
I don't know how is a sleep of 1 second going to be harmful here instead of
keeping a busy wait.
Even if a=b is going to take 1 week as u say, isn't a sleep of 1 second, if
nothing, would save some CPU resources instead of blindly looping for ever ?
Aren't busy
On 10/10/07, Richard Huxton [EMAIL
Hi there,
if I order a given year in DESCending ORDER, so that the highest
values (of a given variable) for the countries are displayed at the
top of the list, then actually the NULL values appear as first. Only
below, I find the values ordered correctly.
Is there any way to
a) make
I don't know how is a sleep of 1 second going to be harmful here instead of
keeping a busy wait.
Even if a=b is going to take 1 week as u say, isn't a sleep of 1 second, if
nothing, would save some CPU resources instead of blindly looping for ever ?
Aren't busy waits dangerous from CPU resources
On Wed, 2007-10-10 at 10:46 +0200, Albe Laurenz wrote:
Ow Mun Heng wrote:
Input is of form
'ppp','aaa','bbb'
I want it to be stripped of quotes to become
ppp,aaa,bbb
I'm a little confused that you think that you will have to
escape single quotes in the input.
What is
Thanks for your comment.
I see two possible solution directions:
1. Is it possible to create C-function, which could accept something like
ROWSET(ARRAY[]) in its input parameters?
E.g. to call it as
SELECT array_rowset_glue((SELECT arrayfield FROM arraytable));
or something like this?
2. Is
Jasbinder Singh Bali wrote:
I don't know how is a sleep of 1 second going to be harmful here instead of
keeping a busy wait.
Even if a=b is going to take 1 week as u say, isn't a sleep of 1 second, if
nothing, would save some CPU resources instead of blindly looping for ever ?
Aren't busy waits
Stefan Schwarzer wrote:
Hi there,
if I order a given year in DESCending ORDER, so that the highest values
(of a given variable) for the countries are displayed at the top of the
list, then actually the NULL values appear as first. Only below, I find
the values ordered correctly.
Is there
Wow, seems I've found that!
* Beginning in PostgreSQL 8.1, the executor's AggState node is passed
as
* the fmgr context value in all transfunc and finalfunc calls. It
is
* not really intended that the transition functions will look into the
* AggState node, but they can
Hi there,
if I order a given year in DESCending ORDER, so that the highest
values (of a given variable) for the countries are displayed at
the top of the list, then actually the NULL values appear as
first. Only below, I find the values ordered correctly.
Is there any way to
a) make the
Stefan Schwarzer wrote:
Hi there,
if I order a given year in DESCending ORDER, so that the highest
values (of a given variable) for the countries are displayed at the
top of the list, then actually the NULL values appear as first. Only
below, I find the values ordered correctly.
Is there any
At 1:32 AM +0100 10/10/07, Gregory Stark wrote:
Owen Hartnett [EMAIL PROTECTED] writes:
Such that the final table has additional subtotal rows with the
aggregate sum
of the amounts. I'm thinking I can generate two tables and merge
them, but is
there an easier way using a fancy Select
Ow Mun Heng wrote:
Input is of form
'ppp','aaa','bbb'
I want it to be stripped of quotes to become
ppp,aaa,bbb
The input is for an SRF which accepts an array..
where the function goes..
create function foo(timestamp, timestamp, foo_list text[])
returns setof
...
I said:
In
Daniel B. Thurman wrote:
I am finding out for the first time that by having a database created
with the name: MyTest, I cannot do a simple query as follows:
postgres=# select * from MyTest.public.cars;
ERROR: cross-database references are not implemented:
mytest.public.cars
Try:
select
Could someone explain to me how the connection is initialized below? I'm
re-writing the script in Ruby...but this is a stumbling block for me in the way
the C++ libs work. Does the library initial conn automagically? How would one
emulate this in another language...would it be to run it as the
On Tue, Oct 09, 2007 at 10:30:15AM -0500, Erik Jones wrote:
On Oct 9, 2007, at 9:38 AM, Sam Mason wrote:
CREATE TABLE circle ( id SERIAL PRIMARY KEY, radius REAL NOT NULL );
CREATE TABLE square ( id SERIAL PRIMARY KEY, sidelen REAL NOT NULL );
CREATE TABLE shapes (
id SERIAL
Richard Huxton escribió:
Stefan Schwarzer wrote:
Hi there,
if I order a given year in DESCending ORDER, so that the highest
values (of a given variable) for the countries are displayed at the
top of the list, then actually the NULL values appear as first.
Only below, I find the values
On 10/10/07, Ow Mun Heng [EMAIL PROTECTED] wrote:
Just wonder if anyone here uses Excel to connect to PG via ODBC.
I'm using it extensively as my platform to get data from PG/MSSQL
directly into excel. (Excel uses the msqry32.exe file which is like a
stripped down sql query tool and returns
I have written in C all needed contrib functions: intarray.bidx() (binary
search in sorted list) and intagg.int_agg_append_state (bufferized appending
of one array to another without linear memory reallocation). The speed now
is great: in one case with intersection of 10 and 15000 arrays it
On 10/10/07, Sam Mason [EMAIL PROTECTED] wrote:
On Tue, Oct 09, 2007 at 10:30:15AM -0500, Erik Jones wrote:
On Oct 9, 2007, at 9:38 AM, Sam Mason wrote:
CREATE TABLE circle ( id SERIAL PRIMARY KEY, radius REAL NOT NULL );
CREATE TABLE square ( id SERIAL PRIMARY KEY, sidelen REAL NOT
Hello list,
I wonder if it is possible to disable triggers for a single transaction.
I know I can disable triggers per table but then I need to disable
all triggers in all recursive tables before doing by query.
Can I do:
BEGIN TRANSACTION;
DISABLE TRIGGERS;
DELETE FROM tbl_foo WHERE ID 5;
On Wed, Oct 10, 2007 at 05:02:36PM +0100, Ian Barber wrote:
I wonder if the best way to go would be to use the OO stuff.
I don't see how the following is object orientated, but I'm not sure it
matters much.
If you had a shapes table, that had the various operations you were
interested in (say
On Oct 10, 2007, at 11:42 AM, Sam Mason wrote:
On Wed, Oct 10, 2007 at 05:02:36PM +0100, Ian Barber wrote:
I wonder if the best way to go would be to use the OO stuff.
I don't see how the following is object orientated, but I'm not
sure it
matters much.
If you had a shapes table, that
I expect that my intuition is incorrect about the use of ALL() and ANY(), but I
found my result to
be reverse from what I expected.
Can anyone explain why ANY() behaves that way it does?
Here are two test case examples that do what I expect:
-- find all parent that only have boys
SELECT *
Richard Broersma Jr wrote:
Here is the example that doesn't do what I expect:
--find all parents that have a mixture of boys and girls.
--but this doesn't return anything
SELECT *
FROM Parents AS P
WHERE 'girl' ALL ( SELECT gender
FROM Children AS C1
Richard Broersma Jr wrote:
Here is the example that doesn't do what I expect:
I'm guessing you're just stood too close to the problem.
--find all parents that have a mixture of boys and girls.
--but this doesn't return anything
SELECT *
FROM Parents AS P
WHERE 'girl' ALL ( SELECT gender
On Oct 10, 2007, at 12:38 PM, Richard Broersma Jr wrote:
I expect that my intuition is incorrect about the use of ALL() and
ANY(), but I found my result to
be reverse from what I expected.
Can anyone explain why ANY() behaves that way it does?
Here are two test case examples that do what
I'm curious what's considered the best way to invoke PG_GETARG_BYTEA_P
in an SPI routine and properly check for null input in non 'strict'
routines. Right now, I'm looking at PG_GETARG_POINTER to check for
null value before using PG_GETARG_BYTEA_P to assign to the bytea
pointer.
ISTM a little
Richard Broersma Jr [EMAIL PROTECTED] writes:
Can anyone explain why ANY() behaves that way it does?
Aside from the responses already given, I'm wondering whether you have
any NULL entries in Children.gender. NULL rows within a NOT IN
subselect tend to produce confusing results ...
--- John D. Burger [EMAIL PROTECTED] wrote:
I read this as: Find all parents such that none of their kids are
girls and none of their kids are boys. That is, ALL of their genders
are 'girl', AND ALL of their genders are 'boy'. Under the
obvious assumptions about gender, the result is
On Oct 5, 2007, at 9:10 AM, Kenneth Downs wrote:
I also found it very hard to pin down the penalty of the trigger,
but came up with rough figures of 30-50% overhead. The complexity
of the trigger did not matter.
in which language did you write your triggers?
On 10/10/07, Henrik [EMAIL PROTECTED] wrote:
Hello list,
I wonder if it is possible to disable triggers for a single transaction.
I know I can disable triggers per table but then I need to disable
all triggers in all recursive tables before doing by query.
Can I do:
BEGIN TRANSACTION;
My Ruby version is found below. Note it requires the postgres-pr ruby driver.
Also note I didn't really ruby-ize it to much...for the most part it's a
one-to-one translation.
One different thing to note...this script expects you to have postgres-pr
installed via rubygems. You can modify the
Sorry...the first version was a bit rash and left out some
features...particularly filtering by table. Here's the patch to correct:
If anyone wants the corrected version, email me off list.
Thanks,
John
# diff -w pg_timer_old.rb pg_timer.rb
18a19
app = File.basename $0
20,21c21,25
PostgreSQL Conference Fall 2007 is a 1-day conference happening on
October 20, 2007 on the beautiful Portland State University campus.
PSU's Computer Science Graduate Student Council is graciously hosting
an excellent group of speakers made up of prominent PostgreSQL
consultants, developers and
1) Am I right when I assume an init.d type of start/kill scenario is
used?
2) The ps -ef shows the process:
/usr/lib/postgresql/7.4/postmaster -D /var/lib/postgresql/7.4/main
postgres: stats buffer process
postgres: stats collector process
I see no logfile explicitly
Merlin Moncure [EMAIL PROTECTED] writes:
I'm curious what's considered the best way to invoke PG_GETARG_BYTEA_P
in an SPI routine and properly check for null input in non 'strict'
routines. Right now, I'm looking at PG_GETARG_POINTER to check for
null value before using PG_GETARG_BYTEA_P to
I am storing a rowtype that keeps the primary key column(s) of another
table. E.g.,
create table point (x int, y int, stuff text, primary key
(x, y));
then, think:
create type point_pk as (x int, y int).
When I go to compare point_pks against one another I get errors about
missing
On 10/11/07, Ralph Smith [EMAIL PROTECTED] wrote:
1) Am I right when I assume an init.d type of start/kill scenario is used?
Aye
2) The ps -ef shows the process:
/usr/lib/postgresql/7.4/postmaster -D
/var/lib/postgresql/7.4/main
postgres: stats buffer process
postgres:
On Wed, 2007-10-10 at 10:22 -0500, Scott Marlowe wrote:
On 10/10/07, Ow Mun Heng [EMAIL PROTECTED] wrote:
Just wonder if anyone here uses Excel to connect to PG via ODBC.
I'm using it extensively as my platform to get data from PG/MSSQL
directly into excel. (Excel uses the msqry32.exe
On Wed, 2007-10-10 at 12:01 -0400, Gauthier, Dave wrote:
-Original Message-
From: [EMAIL PROTECTED]
[mailto:pgsql-general-[EMAIL PROTECTED] On Behalf Of Scott Marlowe
Sent: Wednesday, October 10, 2007 11:23 AM
To: Ow Mun Heng
Cc: pgsql-general@postgresql.org
Subject: Re: [GENERAL]
Hi all,
We are facing some problems after the migration of our PostgreSQL 8.0 to the
8.2.4 version. The entire box runs under SUSE 10.3.
bd_sgp=# select version();
version
Carlos H. Reimer [EMAIL PROTECTED] writes:
... if you name all the table columns instead of using the * the query
runs fine, otherwise it locks.
[ blink... ] You really, really, really need to provide a reproducible
test case to prove that claim.
The problem only occurs if we use remote
On Oct 10, 2007, at 10:09 PM, Carlos H. Reimer wrote:
Hi all,
We are facing some problems after the migration of our PostgreSQL
8.0 to the 8.2.4 version. The entire box runs under SUSE 10.3.
bd_sgp=# select version();
version
hi all,
msiexec /i D:\usr\local\postgre\postgresql-8.2-int.msi /qb INTERNALLAUNCH=1
ADDLOCAL=server,psql,docs SERVICEDOMAIN=%COMPUTERNAME% CREATESERICEUSER=1
BASEDIR=d:\usr\local\postgres SERVICEACCOUNT=postgres
SERVICEPASSWORD=postgres SUPERPASSWORD=11 PERMITREMOTE=1
i try to the silent
Hi,
Is it possible to change the current role to another arbitrary role
using a PLPGSQL function?
In essence I've a function authorise created by the db superuser with
'SECURITY DEFINER' specificied.
However from within plpgsql the 'superuser' attribute isn't honored when
trying to change
Greg Wickham [EMAIL PROTECTED] writes:
Is it possible to change the current role to another arbitrary role
using a PLPGSQL function?
Yes.
However from within plpgsql the 'superuser' attribute isn't honored when
trying to change roles
IIRC we deliberately restrict inheritance of superuser
Hi,
I have bytea column in one table and using C language, I am trying to
insert a binary data (having NULLs)
into bytea column, but it just inserts/updates till NULL reached.
Please let know whether I am missing something.
Any other approach - may I use some data type instead of
62 matches
Mail list logo