Hi,
Is it possible to do the equivalent of RAISE EXCEPTION inside a C-function?
Like this:
PG_FUNCTION_INFO_V1(check_something);
Datum check_something(PG_FUNCTION_ARGS)
{
// RAISE EXCEPTION 'bla bla'
}
CREATE OR REPLACE FUNCTION do_check() RETURNS text AS $$
BEGIN
PERFORM check
Hello
2010/12/20 Elliot Chance :
> Hi,
>
> Is it possible to do the equivalent of RAISE EXCEPTION inside a C-function?
> Like this:
>
>
sure, there are functions elog and ereport
Regards
Pavel Stehule
> PG_FUNCTION_INFO_V1(check_something);
> Datum check_something(PG_FUNCTION_ARGS)
> {
>
Hello,
We have two postgreSQL servers that are in the latest 9.x as testing, but when
we use pg_dump and pg_restore, our functions and triggers are never copied to
postgreSQL Server 9.x.
This is how we restore:
data=`date +%Y_%m_%d`
pg_restore -c -i -h 192.168.0.9 -p 5432 -U postgres -d global
ok, solved. it was a problem with the application that interfaces with pg that
has a bug ...
sorry,
regards,
r.
On 20dic, 2010, at 09:28 , Raimon Fernandez wrote:
> Hello,
>
> We have two postgreSQL servers that are in the latest 9.x as testing, but
> when we use pg_dump and pg_restore, ou
On Sun, 19 Dec 2010, Glenn Maynard wrote:
2010/12/19 Oleg Bartunov :
You might be interested in http://www.sai.msu.su/~megera/wiki/2009-08-12
Thanks, that looks pretty much like what I had in mind. Hopefully
that'll get merged for 9.0+1; phrases are a major part of all text
searches.
Sever
I'd like to guard postgres from overcharged and/or malicious queries.
The queries are strinctly read-only (from a SQL users perspective).
For doing this I'd like to code two functions (preferrably pl/pgsql):
1. Filter out all SQL commands which are *not* read-only (no
DROP/DELETE/UPDATE/TRUNCATE)
Does any one use pg_statsinfo for Postgresql 9.0.1? Is there any similar
tools to collect DB Snapshots?
I am facing problem during pg_statsinfo configuration.
I set as follows:
shared_preload_libraries = 'pg_statsinfo,pg_stat_statements'
custom_variable_classes = 'pg_statsinfo'
But my Db is not s
Hi !
> I am facing problem during pg_statsinfo configuration.
> I set as follows:
> shared_preload_libraries = 'pg_statsinfo,pg_stat_statements'
> custom_variable_classes = 'pg_statsinfo'
> But my Db is not starting.
Which version did you use ?
And what log-message were generated ?
If you used r
2010/12/19 Jasen Betts
> I have some values of perhaps 20Mb that I might want to store samples
> of in a partitioned table. (so I can delete them easily) what's the right
> way?
>
>
20 Mbits or 20 MBytes?
how big samples?
answer to your question depends on what you want to do with these samples
On Mon, 2010-12-20 at 19:29 +0900, Tatsuhito Kasahara wrote:
> ( I mistook to edit the RPM SPEC file for pg90.rhel5.x86_64... So some
> user reported that
> "No such files" error was occured when they used the rpm of
> pg_statsinfo-2.0.0 with
> PG90 on RHEL5.x86_64)
Sorry for breaking the thr
2010/12/20 Devrim GÜNDÜZ :
> Sorry for breaking the thread a bit -- but where is that specfile? I
> cannot find it in the tarball.
>
> Also SRPMs are missing on the website.
Now, specfiles and SRPMs are not provided on the pg_statsindo project page..
I'll upload these files ASAP.
Best regards,
-
On 20 Dec 2010, at 10:05, Stefan Keller wrote:
> I'd like to guard postgres from overcharged and/or malicious queries.
>
> The queries are strinctly read-only (from a SQL users perspective).
> For doing this I'd like to code two functions (preferrably pl/pgsql):
>
> 1. Filter out all SQL command
Hello,
I'm trying to create a plugin using the libpq.
Almost everything is working, and now I want to implememt the asynchronous
issue.
I send the SQL using the PQsendQuery, and my interface is not blocking, great.
Now, everytime I check fot the PQgetResult my interface gets blocked.
So, now
Thanks, Adrian,
Ill try a windows compile of pgloader sometime during the holidays. Its
true that I already have a solution (export <= 65000 row chunks, import into
Excel, export via Excel puts quotes around the text columns), but something
faster and more efficient would really help in this cas
On Sat, Dec 18, 2010 at 7:12 AM, Vishnu S. wrote:
> I am using Slony-I slony-I-2.0.2 in windows .I have a master and a slave
> machine. The replication is working fine. When the master switches to slave
> , there exists a serial key mismatch in master and slave machines. So
> insertion fails in th
With OpenOffice.org that 65K limit goes away as well...
I don't know why it is still like that today for MS Office... It is almost
2011 and they still think 64K is enough? :-)
--
Jorge Godoy
On Mon, Dec 20, 2010 at 11:49, Mark Watson wrote:
> Thanks, Adrian,
>
> I’ll try a windows compi
On Mon, Dec 20, 2010 at 3:28 AM, Raimon Fernandez wrote:
> when restoring the same file to any of our postgreSQL Servers 8.x we have no
> problems.
>
which version of pg_dump/restore are you using? The one from 8.x or
9.0? Try using the ones from 9.0.
--
Sent via pgsql-general mailing list (
No reply... I guess its not possible then to switch that off.
Hi,
I occasionally output information from my PL/Perl functions to show a progres
or a debug info like this
elog(NOTICE, "Table some_table analyzed");
which generated the
NOTICE: Table some_table analyzed
however since up
On Monday 20. December 2010 15.24.58 Jorge Godoy wrote:
> With OpenOffice.org that 65K limit goes away as well...
>
> I don't know why it is still like that today for MS Office... It is
almost
> 2011 and they still think 64K is enough? :-)
Maybe there's an uncrippled «Professional» or «Enterpri
I'm just wondering what programs you guys / girls are using PostgreSQL
for. So far I've installed PG 9 on my Debian Linux server and manually
created all my databases, schema's, and tables for my personal email /
address book. It's very basic and small but I was wondering if you
guys know of any pr
On Monday 20 December 2010 7:09:23 am Leif Biberg Kristensen wrote:
> On Monday 20. December 2010 15.24.58 Jorge Godoy wrote:
> > With OpenOffice.org that 65K limit goes away as well...
> >
> > I don't know why it is still like that today for MS Office... It is
>
> almost
>
> > 2011 and they still
I was looking at my users and realized none of my users are members of
a specific group or role. Not sure if there's a difference between the
two (role / group) in PostgreSQL, is there?
easports=# \du
List of roles
Role name |Attributes | Member of
-
On Monday 20 December 2010 7:27:19 am Carlos Mennens wrote:
> I was looking at my users and realized none of my users are members of
> a specific group or role. Not sure if there's a difference between the
> two (role / group) in PostgreSQL, is there?
>
> easports=# \du
>Lis
On Mon, Dec 20, 2010 at 10:41 AM, Adrian Klaver wrote:
> Roles = users/groups. In older versions there where users and groups, that has
> been consolidated into the concept of a role. If it makes it easier I use the
> concept of roles with login privileges as a users and roles without as groups.
> On 2010-12-16, pgsql(dot)30(dot)miller_2555(at)spamgourmet(dot)com
> wrote:
> > --0015174c1e4aaf077604977d7e62
> > Content-Type: text/plain; charset=ISO-8859-1
> >
> > Hi -
> >
> > Issue:
> > How to return a sequence value generated upon INSERT of records into a
> > partitioned table using
On Mon, Dec 20, 2010 at 9:12 AM, Carlos Mennens
wrote:
> So if I wanted to create a group / role for accounting, would I simply just
> do:
>
> CREATE ROLE accounting;
>
> My question is I can't find:
>
> 1. How to view all previously created roles on my database. '\dg'
> doesn't show me the new r
On Mon, Dec 20, 2010 at 12:05 PM, Scott Marlowe wrote:
> Odd, mine does. Got a complete example of creating a role and not seeing it?
>
> Here's mine:
> smarlowe=# create role stans;
> CREATE ROLE
> smarlowe=# \dg
> List of roles
> Role name | Attributes | Member of
> ---+--
On 12/20/2010 08:12 AM, Carlos Mennens wrote:
On Mon, Dec 20, 2010 at 10:41 AM, Adrian Klaver wrote:
Roles = users/groups. In older versions there where users and groups, that has
been consolidated into the concept of a role. If it makes it easier I use the
concept of roles with login privilege
On Mon, Dec 20, 2010 at 10:04 AM, Alex - wrote:
> No reply... I guess its not possible then to switch that off.
>
>
> Hi,
> I occasionally output information from my PL/Perl functions to show a
> progres or a debug info like this
>
> elog(NOTICE, "Table some_table analyzed");
>
> which generated t
Raimon Fernandez writes:
> Almost everything is working, and now I want to implememt the asynchronous
> issue.
> I send the SQL using the PQsendQuery, and my interface is not blocking, great.
> Now, everytime I check fot the PQgetResult my interface gets blocked.
Well, yes. PQgetResult says w
On Mon, Dec 20, 2010 at 10:12 AM, Carlos Mennens
wrote:
> On Mon, Dec 20, 2010 at 12:05 PM, Scott Marlowe
> wrote:
>> Odd, mine does. Got a complete example of creating a role and not seeing it?
>>
>> Here's mine:
>> smarlowe=# create role stans;
>> CREATE ROLE
>> smarlowe=# \dg
>> L
Hello,
I am investigating security requirements for configuring a PostgreSQL
database on a Linux system.
One of the security requirements our organization would like to implement is
"trusted startup", in that PostgreSQL would verify the authenticity of the
binaries and configuration files before m
On Mon, Dec 20, 2010 at 1:32 PM, Scott Marlowe wrote:
> No user, no group, they're al roles. Roles are both / either.
Ah now I understand. Thank you!
> You grant them that:
>
> grant rolename to username;
>
> Then you only ever have to grant / revoke a role to change
> permissions, no need to d
On Monday 20 December 2010 11:46:29 am Carlos Mennens wrote:
> On Mon, Dec 20, 2010 at 1:32 PM, Scott Marlowe
wrote:
> > No user, no group, they're al roles. Roles are both / either.
>
> Ah now I understand. Thank you!
>
> > You grant them that:
> >
> > grant rolename to username;
> >
> > Then y
On Mon, Dec 20, 2010 at 12:12 PM, Kenneth Buckler
wrote:
> Hello,
>
> I am investigating security requirements for configuring a PostgreSQL
> database on a Linux system.
> One of the security requirements our organization would like to implement is
> "trusted startup", in that PostgreSQL would ver
On 12/20/10 11:12 AM, Kenneth Buckler wrote:
Hello,
I am investigating security requirements for configuring a PostgreSQL
database on a Linux system.
One of the security requirements our organization would like to
implement is "trusted startup", in that PostgreSQL would verify the
authenticit
On Mon, Dec 20, 2010 at 1:43 PM, John R Pierce wrote:
> I would look into selinux. lock it down with this, and it will be much
> harder to compromise.
I agree. By the time you've got compromised binaries / config files
on the system, you've already lost.
--
Sent via pgsql-general mailing lis
On 20dic, 2010, at 18:48 , Tom Lane wrote:
>> So, now I'm using the PQisBusy to check if postgre is still busy and I can
>> safely call the PQgetResult wihtout blocking, or just wait *some time*
>> before sending a new PQisBusy.
>
> Your proposed code is still a busy-wait loop.
This is how ar
On Mon, Dec 20, 2010 at 3:31 PM, Scott Marlowe wrote:
>
>
> But, if the script is run on the same machine as postgresql is on, the
> scripts that check for changes could be compromised as well and then
> you'd never know.
>
I agree, if the system has been compromised, nothing will prevent the
scr
On 20 Dec 2010, at 21:49, Raimon Fernandez wrote:
> The select(2) that says that are using for wait is this line ? if
> (select(sock + 1, &input_mask, NULL, NULL, NULL) < 0) {
>
> I can't see where is 'sleeping'
See man 2 select.
If you're on an OS without manual pages (Windows is pretty much
On 29 November 2010 04:31, Elliot Chance wrote:
> Discussion will continue on the wiki page:
> http://wiki.postgresql.org/wiki/Forums_at_postgresql.com.au
>
> Even though the discussion has moved I still intent to keep pushing the
> issues to a resolution. The wiki is not shelving the idea for an
Hello all- I am using psql from the command line in an Ubuntu
environment, and I'd like to setup (if possible) some sort of client
configuration for myself that sets some environment variables, mainly
client_min_messages. Is there a way to do this?
Thanks.
--
Wells Oliver
Developer, Baseball Syst
On Monday 20 December 2010 4:42:57 pm Wells Oliver wrote:
> Hello all- I am using psql from the command line in an Ubuntu
> environment, and I'd like to setup (if possible) some sort of client
> configuration for myself that sets some environment variables, mainly
> client_min_messages. Is there a
I built and installed -9.0.1 on my Slackware-13.1 server and it ran for a
while. Now, without warning, one of my applications dependent upon postgres
won't run. While trying to restart postgres I learned the .pid file did not
exist so I removed /tmp/.s.PGSQL* and tried to restart postgres.
He
On Monday 20 December 2010 5:09:24 pm Rich Shepard wrote:
>I built and installed -9.0.1 on my Slackware-13.1 server and it ran for
> a while. Now, without warning, one of my applications dependent upon
> postgres won't run. While trying to restart postgres I learned the .pid
> file did not exis
On 12/20/10 5:09 PM, Rich Shepard wrote:
I built and installed -9.0.1 on my Slackware-13.1 server and it ran
for a
while. Now, without warning, one of my applications dependent upon
postgres
won't run. While trying to restart postgres I learned the .pid file
did not
exist so I removed /tmp/.
On Mon, Dec 20, 2010 at 5:42 PM, Wells Oliver wrote:
> Hello all- I am using psql from the command line in an Ubuntu environment,
> and I’d like to setup (if possible) some sort of client configuration for
> myself that sets some environment variables, mainly client_min_messages. Is
> there a way
On 12/21/2010 06:12 AM, Kenneth Buckler wrote:
Hello,
I am investigating security requirements for configuring a PostgreSQL
database on a Linux system.
One of the security requirements our organization would like to
implement is "trusted startup", in that PostgreSQL would verify the
authenticity
On Mon, 20 Dec 2010, Adrian Klaver wrote:
As I remember it there was more than one version of Postgres on this
machine. Are you sure you are using the correct postgres binary? While I
am it is there a reason you are not using the system start scripts or
pg_ctl:)?
Adrian,
There _was_ a libra
On Mon, 20 Dec 2010, John R Pierce wrote:
if you built and installed postgres in /usr/local/pgsql, then all those
errors should have referred to /usr/local/pgsql/share/timezone
John,
I assumed the reference to share/ was relative to /usr/local/pgsql/
is there a different postgres binary i
On Monday 20 December 2010 7:12:52 pm Rich Shepard wrote:
> On Mon, 20 Dec 2010, Adrian Klaver wrote:
> > As I remember it there was more than one version of Postgres on this
> > machine. Are you sure you are using the correct postgres binary? While I
> > am it is there a reason you are not using t
On Mon, 20 Dec 2010, Adrian Klaver wrote:
Well that would be a problem. Still, using pg_ctl would be an improvement.
From the docs
(http://www.postgresql.org/docs/9.0/interactive/app-pg-ctl.html): "pg_ctl
is a utility for initializing a PostgreSQL database cluster, starting,
stopping, or restart
Hi,
I am having some trouble trying to figure out how to configure this
particular scenario..
I have a pair of pg servers that I want to put in a Master/Standby
configuration. Currently a script dumps the master db every hour, copies it
to the standby, restores, and restarts the server. The aim i
You can have a look at my project on sourceforge:
http://sourceforge.net/projects/proghelp builds applications with PG as a
backend automatically. It uses a modified create table sql grammar as an
input.
1. It automatically generates stored procedures to insert and retrieve data
2. a database api
On 21dic, 2010, at 00:56 , Alban Hertroys wrote:
> On 20 Dec 2010, at 21:49, Raimon Fernandez wrote:
>
>> The select(2) that says that are using for wait is this line ? if
>> (select(sock + 1, &input_mask, NULL, NULL, NULL) < 0) {
>>
>> I can't see where is 'sleeping'
>
>
> See man 2 select.
55 matches
Mail list logo