Re: [GENERAL] 'value too long' and before insert/update trigger

2017-08-23 Thread David G. Johnston
On Wednesday, August 23, 2017, Kevin Golding wrote: > Presumably the length validation is being done before the trigger is run. > Is there some way this could be changed so the trigger happens first? > The input tuple passed into the trigger is a valid record of the same type as the table to whi

Re: [GENERAL] 'value too long' and before insert/update trigger

2017-08-23 Thread Pavel Stehule
Hi 2017-08-24 7:08 GMT+02:00 Kevin Golding : > Hi all > I'm currently migrating a legacy Informix 4gl application to run on > PostgreSQL (v9.5.8) > > There are errors occurring because sometimes the application tries to > insert/update values longer than the definition of the database column. > T

Re: [GENERAL] 'value too long' and before insert/update trigger

2017-08-23 Thread Charles Clavadetscher
Hi > -Original Message- > From: pgsql-general-ow...@postgresql.org > [mailto:pgsql-general-ow...@postgresql.org] On Behalf Of Kevin Golding > Sent: Donnerstag, 24. August 2017 07:08 > To: pgsql-general@postgresql.org > Subject: [GENERAL] 'value too long' and before insert/update trigger >

[GENERAL] 'value too long' and before insert/update trigger

2017-08-23 Thread Kevin Golding
Hi all I'm currently migrating a legacy Informix 4gl application to run on PostgreSQL (v9.5.8) There are errors occurring because sometimes the application tries to insert/update values longer than the definition of the database column. The error message is eg. "value too long for type character

Re: [GENERAL] DROP [TEMP] TABLE syntax, as reason why not?

2017-08-23 Thread Tom Lane
"David G. Johnston" writes: > I'm wondering if there is anything technical preventing someone from making: > DROP TEMP TABLE tablename; There is no great need for that because you can get the semantics you're asking for with "DROP TABLE pg_temp.tablename". regards, tom l

Re: [GENERAL] jdbc driver vis Release 10

2017-08-23 Thread Rob Sargent
On 08/23/2017 06:09 PM, David G. Johnston wrote: On Wed, Aug 23, 2017 at 4:33 PM, Rob Sargent >wrote: I see no mention of a new jdbc driver on the release notes for Beta 1. Does that mean there isn't one? ​Whose release notes? PostgreSQL Server? I don

Re: [GENERAL] jdbc driver vis Release 10

2017-08-23 Thread David G. Johnston
On Wed, Aug 23, 2017 at 4:33 PM, Rob Sargent wrote: > I see no mention of a new jdbc driver on the release notes for Beta 1. > Does that mean there isn't one? ​Whose release notes? PostgreSQL Server? I don't believe the server release notes ever talk about external projects.​ Its seems quite

[GENERAL] jdbc driver vis Release 10

2017-08-23 Thread Rob Sargent
I see no mention of a new jdbc driver on the release notes for Beta 1. Does that mean there isn't one? -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

[GENERAL] DROP [TEMP] TABLE syntax, as reason why not?

2017-08-23 Thread David G. Johnston
Hey all, I'm wondering if there is anything technical preventing someone from making: DROP TEMP TABLE tablename; work. Implementation wise the command would fail if a temporary table of the given name doesn't exist. Today, if a temporary table exists it will be dropped, but if tablename is not

Re: [GENERAL] PG and database encryption

2017-08-23 Thread Stephen Frost
Greetings, * Scott Marlowe (scott.marl...@gmail.com) wrote: > On Tue, Aug 22, 2017 at 3:13 PM, PT wrote: > > On Tue, 22 Aug 2017 12:48:13 -0700 (MST) > > rakeshkumar464 wrote: > >> We have a requirement to encrypt the entire database. What is the best > >> tool > >> to accomplish this. Our pri

Re: [GENERAL] Function not inserting rows

2017-08-23 Thread rob stone
Hello, On Wed, 2017-08-23 at 17:23 +0200, Frank Foerster wrote: > > > > But the created statement looks syntax-wise identical to the pgadmin- > statement (except for the forced error of course): > > select * from api_dev.add_texts_to_item( 444, array['PGADM1', > 'PGADM2'] ); > > > I don't

Re: [GENERAL] Function not inserting rows

2017-08-23 Thread ivay
Thanks, that was it. I did not commit as i was calling "only" a select-statement. Thanks 2017-08-23 18:20 GMT+02:00 Daniele Varrazzo : > On Wed, Aug 23, 2017 at 4:23 PM, Frank Foerster > wrote: > > > Any ideas ? > > commit? > > -- Daniele >

Re: [GENERAL] Function not inserting rows

2017-08-23 Thread Daniele Varrazzo
On Wed, Aug 23, 2017 at 4:23 PM, Frank Foerster wrote: > Any ideas ? commit? -- Daniele -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] Function not inserting rows

2017-08-23 Thread David G. Johnston
On Wed, Aug 23, 2017 at 8:23 AM, Frank Foerster wrote: > > sql = "select * from api_dev.add_texts_to_item( %s, %s ); x x" > i get the following python-error: > psycopg2.ProgrammingError: FEHLER: Syntaxfehler bei »s« > LINE 1: ...dd_texts_to_item( 1234, ARRAY['PSYCOPG1', 'PSYCOPG2'] ); s

[GENERAL] Function not inserting rows

2017-08-23 Thread Frank Foerster
Hi, i have the following question: Given an empty database with only schema api_dev in it, a table and a function is created as follows: CREATE TABLE api_dev.item_texts ( item_id integer, item_text text ) WITH ( OIDS=FALSE ); CREATE OR REPLACE FUNCTION api_dev.add_texts_to_item( p_it

Re: [GENERAL] What is the proper query

2017-08-23 Thread Igor Korot
Hi, On Tue, Aug 22, 2017 at 6:18 PM, Igor Korot wrote: > Melvin et al, > > On Tue, Aug 22, 2017 at 12:55 PM, Melvin Davidson > wrote: > >> >> >> >> *While the information_schema is useful, there is no substitute for >> learning how to use the pg_catalog and system information functions.* >> >>